Invalid Expression assumed Zero - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Invalid Expression assumed Zero (
/showthread.php?tid=449203)
Invalid Expression assumed Zero -
Blackazur - 07.07.2013
Hello, i have this error on this line, how can i fix it?
Код:
if(pInfo[playerid][pCookies] >= 5){
new weapons[500];
pInfo[playerid][pCookies] -= 0;
strcat(weapons,"{FF0000}Which Weapon do you want to buy?","Deagle - Ammo: 200 (5 Cookies)\nShotgun - Ammo: 200 (10 Cookies)\nMP5 or SMG - Ammo: 300 (15 Cookies)\nAK-47 Assault Rifle - Ammo: 300 (20 Cookies)\nM4 Assault Rifle - Ammo: 300 (20 Cookies)\nSniper Rifle - Ammo: 150 (25 Cookies)");
else { SendCookieError(playerid,5); }
ShowPlayerDialog(DIALOG_BUY_WEAPONS,DIALOG_STYLE_LIST,"{FF0000}Which Weapon do you want to buy?",weapons,"Select","Close");
}
}
I think something is wrong with the code..
Re: Invalid Expression assumed Zero -
SsHady - 07.07.2013
What's the Error and What's the Line of that error?
AW: Invalid Expression assumed Zero -
Blackazur - 07.07.2013
this:
Код:
strcat(weapons,"{FF0000}Which Weapon do you want to buy?","Deagle - Ammo: 200 (5 Cookies)\nShotgun - Ammo: 200 (10 Cookies)\nMP5 or SMG - Ammo: 300 (15 Cookies)\nAK-47 Assault Rifle - Ammo: 300 (20 Cookies)\nM4 Assault Rifle - Ammo: 300 (20 Cookies)\nSniper Rifle - Ammo: 150 (25 Cookies)");
else { SendCookieError(playerid,5); }
ShowPlayerDialog(DIALOG_BUY_WEAPONS,DIALOG_STYLE_LIST,"{FF0000}Which Weapon do you want to buy?",weapons,"Select","Close");
Re: Invalid Expression assumed Zero -
GiamPy. - 07.07.2013
The code seems incomplete, and fix the identation please.
This this, though:
pawn Код:
if(pInfo[playerid][pCookies] >= 5)
{
new weapons[500];
pInfo[playerid][pCookies] -= 0;
strcat(weapons,"{FF0000}Which Weapon do you want to buy?","Deagle - Ammo: 200 (5 Cookies)\nShotgun - Ammo: 200 (10 Cookies)\nMP5 or SMG - Ammo: 300 (15 Cookies)\nAK-47 Assault Rifle - Ammo: 300 (20 Cookies)\nM4 Assault Rifle - Ammo: 300 (20 Cookies)\nSniper Rifle - Ammo: 150 (25 Cookies)");
ShowPlayerDialog(DIALOG_BUY_WEAPONS,DIALOG_STYLE_LIST,"{FF0000}Which Weapon do you want to buy?",weapons,"Select","Close");
}
else
{
SendCookieError(playerid,5);
}