PDA

View Full Version : dialogid help


Another1
23/10/2013, 01:18 AM
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

if(dialogid == 12)
{

if(response)
{

switch (12)
{
case 1:
{
SetPlayerColor(playerid, Pink);
}

case 2:
{
SetPlayerColor(playerid, Grey);
}

return 1;
}

return 1;
}

C:\Users\John\Desktop\Server\filterscripts\TuNiAdm in.pwn(300) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\John\Desktop\Server\filterscripts\TuNiAdm in.pwn(300) : warning 215: expression has no effect
C:\Users\John\Desktop\Server\filterscripts\TuNiAdm in.pwn(303) : warning 217: loose indentation
C:\Users\John\Desktop\Server\filterscripts\TuNiAdm in.pwn(311) : error 030: compound statement not closed at the end of file (started at line 282)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

[CG]Milito
23/10/2013, 01:20 AM
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 12)
{
if(response)
{
switch (listitem)
{
case 0:
{
SetPlayerColor(playerid, Pink);
}
case 1:
{
SetPlayerColor(playerid, Grey);
}
}
}
}
return 1;
}

TonyII
23/10/2013, 01:23 AM
You're missing 2 brackets aswell