OnDialogResponse - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnDialogResponse (
/showthread.php?tid=151569)
OnDialogResponse -
Antonio [G-RP] - 30.05.2010
I didn't know I was really so bad...
I get about 25 errors because I'm not doin this right.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!response)return 0;
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Jobs","Taxi Driver\r\nTruck Driver\r\nGrave Digger\r\nPizza Boy\r\nHeli Transporter\r\nGarbage Man","Select","Exit");
}
case 1:
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Licenses","Coming Soon","Select","Exit");
}
case 2:
{
ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Other","Just taking up space","Select","Exit");
}
}
return 1;
}
Re: OnDialogResponse -
Nero_3D - 30.05.2010
You are missing a closing brace
Re: OnDialogResponse -
Antonio [G-RP] - 30.05.2010
Mind telling me, where?
Nvm: Thanks man
Re: OnDialogResponse -
Nero_3D - 30.05.2010
Indention could help
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!response)return 0;
switch(listitem)
{
case 0:
ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Jobs","Taxi Driver\r\nTruck Driver\r\nGrave Digger\r\nPizza Boy\r\nHeli Transporter\r\nGarbage Man","Select","Exit");
case 1:
ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Licenses","Coming Soon","Select","Exit");
case 2:
ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Other","Just taking up space","Select","Exit");
}
} //missing
return 1;
}
Re: OnDialogResponse -
Antonio [G-RP] - 31.05.2010
I don't indent my work.. its really confusing to others, but I'm used to it