In OnDialogResponse undefined symbol however the command is created. - 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)
+--- Thread: In OnDialogResponse undefined symbol however the command is created. (
/showthread.php?tid=659010)
In OnDialogResponse undefined symbol however the command is created. -
Tass007 - 20.09.2018
Hi there,
In OnDialogResponse callback I have this line (Where the error is)
PHP код:
if(!response) return cmd_io1(playerid, "");
And I'm getting the error
Код:
(2485) : error 017: undefined symbol "cmd_io1"
However I have the command created and it is created before the dialog callback so I'm stuck on ideas on what it could be because it's defined...
PHP код:
CMD:io1(playerid,params[])
{
new string[128];
new dialog[500];
for(new x;x<MAX_OSLOTS2;x++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, x))
{ format(string, sizeof(string), ""COL_WHITE"Slot:%d :: "COL_GREEN"Used Slot\n", x); }
else format(string, sizeof(string), ""COL_WHITE"Slot:%d\n", x);
strcat(dialog,string);
}
ShowPlayerDialog(playerid, DIALOG_ATTACH_INDEX_SELECTION, DIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Slot)", dialog, "Select", "Close(X)");
return 1;
}
Re: In OnDialogResponse undefined symbol however the command is created. -
v1k1nG - 20.09.2018
Which command processor are you using?
Re: In OnDialogResponse undefined symbol however the command is created. -
Tass007 - 20.09.2018
Pawn.CMD
Re: In OnDialogResponse undefined symbol however the command is created. -
v1k1nG - 20.09.2018
PHP код:
forward PC_OnInit(); // somewhere in ur gamemode
PC_EmulateCommand(playerid, "/io1"); // Under dialog response
Re: In OnDialogResponse undefined symbol however the command is created. -
Tass007 - 20.09.2018
Awesome thank you!