31.12.2010, 13:00
(
Последний раз редактировалось Universal; 31.12.2010 в 13:36.
)
Hello everyone, so I've been making a inventory system and i got these errors recently:
and here are the code lines:
Thanks in any advice!
P.S. yes, I created that code by myself and i know that it could be a wrong way of scripting that function, but I improvised. So, I would like to know how to make this done?
Код:
(1119) : error 002: only a single statement (or expression) can follow each "case" (1119) : error 029: invalid expression, assumed zero (1119) : warning 215: expression has no effect (1119) : error 017: undefined symbol "i" (1119) : fatal error 107: too many error messages on one line
pawn Код:
if(dialogid == DIALOG_INV) {
if(response) {
new msg[100], Float:X,Float:Y,Float:Z;
switch(listitem) {
for(new i=0; i<sizeof(listitem); i++) { // <--------- THE LINE
case i: {
if(PlayerInv[i][playerid] == 0) return SendClientMessage(playerid,CLR_GREY,"This slot is empty.");
else if(PlayerInv[i][playerid] == 1) {
GivePlayerWeapon(playerid,4,1);
PlayerInv[i][playerid] = 0;
}
}
}
}
}
}
P.S. yes, I created that code by myself and i know that it could be a wrong way of scripting that function, but I improvised. So, I would like to know how to make this done?