SA-MP Forums Archive
ZCMD in 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)
+--- Thread: ZCMD in OnDialogResponse (/showthread.php?tid=624250)



ZCMD in OnDialogResponse - jaydon - 13.12.2016

Код:
	if(dialogid == DIALOG_VEHICLES)
	    {
	        if(response)
	               {
				switch(listitem)
				{
				case 0: return cmd_elegy(playerid,"");
				case 1: return cmd_nrg(playerid,"");
				case 2: return cmd_inf(playerid,"");
				}
			}
		return 1;
	}
is this possible to do? i keep getting
Код:
(400) : error 035: argument type mismatch (argument 2)
(401) : error 035: argument type mismatch (argument 2)
(402) : error 035: argument type mismatch (argument 2)
ive ******d around and cant find the answer im looking for.


Re: ZCMD in OnDialogResponse - Konstantinos - 13.12.2016

The second parameter of the public function must be an array. This is correct:
Код:
CMD:elegy(playerid, params[])
and this is not (would give the same error):
pawn Код:
CMD:elegy(playerid, params)



Re: ZCMD in OnDialogResponse - jaydon - 13.12.2016

[QUOTE=Konstantinos;3812747]The second parameter of the public function must be an array. This is correct:
Код:
CMD:elegy(playerid, params[])
Beautiful Thank you very much <3