04.12.2009, 20:25
Quote:
Originally Posted by Pload
Thanks for the reply Donny.
Unfortunately your code really doesn't do the tricks needed. Using just numbers to define the arrays works to an extent but it also removes the ability to store strings within those arrays as far as I know. It also becomes confusing for calling values later on in programming. I would need to call "3" instead of "pIntSex" which is easy enough with the small amount of variables currently there but once there is over 20, I'm not going to be able to easily tell what variable I'm calling at all. |
Bloody chars ay, they spoil all the fun.
You could always use two enums to track them (or macros):
pawn Код:
enum
{
pStrKey[128]
pIntLevel,
pIntSex
}
enum
{
pIntLevel_IDX = 128, //pStrKey size (0 - 127)
pIntSex_IDX //129
}
pawn Код:
PlayerInfo[0][pIntSex_IDX] = .... //pIntSex_ID is 129, 129 is pIntSex in the array slots, based on my above example