Bengan12
Well-Known Member
- Joined
- Feb 24, 2011
- Messages
- 1,967
- Reaction score
- 31
Now i followed the documentation, to try to find how to get free bag slots, more like how many.
wo i want this to be an integer so i can post a number right?
so i found in styx.logic.inventory a freeslots function something.
now the documention say
Why?
i go with the C# one as it looks correct.
now this should get number of free slots? or am i just stupied, this is the first time i look in to the documentation.
so i set it to...
What i think this will do is to get the number of free slots and put it to an integer named FreeSlots, HB compiles it ok, but when it tries to use it likte this...
HB crashes
am i on the right track to get it to work? where can i read more?
wo i want this to be an integer so i can post a number right?
so i found in styx.logic.inventory a freeslots function something.
now the documention say
Code:
C#
Code:
Visual basic
Code:
Visual C++
Why?
i go with the C# one as it looks correct.
Code:
public static int FreeSlots { get; }
now this should get number of free slots? or am i just stupied, this is the first time i look in to the documentation.
so i set it to...
Code:
public static int FreeSlots { get{ return FreeSlots; } }
What i think this will do is to get the number of free slots and put it to an integer named FreeSlots, HB compiles it ok, but when it tries to use it likte this...
Code:
Styx.Helpers.Logging.Write(Color.FromName("Purple"), "We have {0} free slots.", FreeSlots);
HB crashes

am i on the right track to get it to work? where can i read more?