(line 995) public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
if(dialogid == electronics_shop_dialog)
{
if(listitem == 0) //Walkie Talkie
{
if(PlayerInfo[playerid][pWalkie] == 0)
{
PlayerInfo[playerid][pWalkie]++;
}
if(PlayerInfo[playerid][pWalkie] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You already own a walkie talkie!");
}
}
if(listitem == 1) //Scanner
{
if(PlayerInfo[playerid][pScanner] == 0)
{
PlayerInfo[playerid][pScanner]++;
}
if(PlayerInfo[playerid][pScanner] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You already own a scanner!");
}
}
}
return 1;
}
}
return 1;
}(line 1030)
#define electronics_shop_dialog
C:\Documents and Settings\GLB\My Documents\Dropbox\Scripts\Gavin\gamemodes\script.pwn(1001) : error 002: only a single statement (or expression) can follow each "case" C:\Documents and Settings\GLB\My Documents\Dropbox\Scripts\Gavin\gamemodes\script.pwn(1001) : error 029: invalid expression, assumed zero C:\Documents and Settings\GLB\My Documents\Dropbox\Scripts\Gavin\gamemodes\script.pwn(1001 -- 1003) : warning 215: expression has no effect C:\Documents and Settings\GLB\My Documents\Dropbox\Scripts\Gavin\gamemodes\script.pwn(1003) : error 001: expected token: ";", but found "if" C:\Documents and Settings\GLB\My Documents\Dropbox\Scripts\Gavin\gamemodes\script.pwn(1003) : fatal error 107: too many error messages on one line
if(dialogid == electronics_shop_dialog)
case electronics_shop_dialog:
|
You need to assign a value to your define, duh. Or use enums like explained on the wiki page. Also a switch works with cases, so replace
pawn Код:
pawn Код:
|