Three lines descriptions.
- make Array
- try to index jump [index(enum) + 1] for empty data
- compile output warning!!! but working good -_-;;;
is that correct way for pawn language?
~~~~.pwn(46) : warning 213: tag mismatch
Header size: 3720 bytes
Code size: 67016 bytes
Data size: 192587988 bytes
Stack/heap size: 16384 bytes; estimated max. usage=1309 cells (5236 bytes)
Total requirements:192675108 bytes
Assume that this code follow bellow.
enum E_SOMETHINGS
{
VAR_1,
VAR_2,
VAR_3,
VAR_4
}
new VARIABLE[MAX_PLAYERS][E_SOMETHINGS];
enum MODEL_DATA
{
MODEL_ID,
NAME[DWORD]
};
new const ITEM_LIST[][MODEL_DATA] =
{
{0, "blah blah"},
{1, "blah blah"},
{2, "blah blah"},
{3, "blah blah"}
};
function(){
for (new i = 0; i < sizeof(ITEM_LIST); i++)
{
if (VARIABLE[playerid][i + VAR_1] <= 0)
continue;
printf("%i %s", ITEM_LIST[i][MODELID], ITEM_LIST[i][NAME]);
}
}
RESULT
- output warning 213 : tag mismatch
- compile done
- working good. but i think this way is wrong.
~~~~.pwn(46) : warning 213: tag mismatch *IMPORTANT*
Header size: 3720 bytes
Code size: 67016 bytes
Data size: 192587988 bytes
Stack/heap size: 16384 bytes; estimated max. usage=1309 cells (5236 bytes)
Total requirements:192675108 bytes
advisory
Prepend _: to enumerate.
ex ) enum _:E_SOMETHINGS { VAR_1, VAR_2, VAR_3, VAR_4 }
Three lines descriptions.
is that correct way for pawn language?
Assume that this code follow bellow.
RESULT