25.05.2016, 23:03
So guys I'm making a little newsstand script with a dialog in my gamemode and I'm getting some weird errors idk why I tried to figure it out but it's not working...Can somebody help me?
This is the ShowPlayerDialog function on /newsstand
And this is public OnDialogResponse
And finally here are the errors
I didn't make all cases cuz of errors... I tried but it gave me many more of them...
This is the ShowPlayerDialog function on /newsstand
Код:
ShowPlayerDialog(playerid, DIALOG_KIOSK, DIALOG_STYLE_LIST, "Kiosk", "1)Mars cokoladica $30\n2)Snickers cokoladica $32\n3)Fanta $28\n4)Coca Cola $29\n5)Kredit 100\n6)Kredit 200\n7)Kartica MTS $50\n8)Cigarete $100\n9)Upaljac $35", "Ok", "Izlaz");
Код:
if(dialogid == DIALOG_KIOSK && response) { switch(listitem) { case 0:GivePlayerMoney(playerid, -30); SCM(playerid, 0xC8D69AFF, "Pojeli ste Mars cokoladicu!"); SetPlayerHealth(playerid, GetPlayerHealth(playerid) + 30); case 1:GivePlayerMoney(playerid, -32); SCM(playerid, 0xC8D69AFF, "Pojeli ste Snickers cokoladicu!"); SetPlayerHealth(playerid, GetPlayerHealth(playerid) + 33); } }
Код:
D:\Samp server\gamemodes\BalkanKingRP.pwn(4503) : error 002: only a single statement (or expression) can follow each "case" D:\Samp server\gamemodes\BalkanKingRP.pwn(4503) : warning 215: expression has no effect D:\Samp server\gamemodes\BalkanKingRP.pwn(4503) : warning 202: number of arguments does not match definition D:\Samp server\gamemodes\BalkanKingRP.pwn(4504) : error 014: invalid statement; not in switch D:\Samp server\gamemodes\BalkanKingRP.pwn(4504) : warning 215: expression has no effect D:\Samp server\gamemodes\BalkanKingRP.pwn(4504) : error 001: expected token: ";", but found ":" D:\Samp server\gamemodes\BalkanKingRP.pwn(4504) : error 029: invalid expression, assumed zero D:\Samp server\gamemodes\BalkanKingRP.pwn(4504) : fatal error 107: too many error messages on one line