Invalid Expression assumed Zero
#1

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..
Reply
#2

What's the Error and What's the Line of that error?
Reply
#3

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");
Reply
#4

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);
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)