Help me Erorr Command - 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: Help me Erorr Command (
/showthread.php?tid=651603)
Help me Erorr Command -
ducmcmca1 - 23.03.2018
Hi, Every Body. Today , I write Command But Command me erorr I dont Know fix error that. Help me!!
Command:
https://pastebin.com/ZzTZLaRh
Erorr:
./includes/ngg.pwn(131329) : error 035: argument type mismatch (argument 1)
./includes/ngg.pwn(131339) : error 035: argument type mismatch (argument 1)
Re: Help me Erorr Command -
AdamsLT - 23.03.2018
Which lines are these anyway? It would be better if you also added a comment on those lines so it would be easier to find the problem.
Found a couple of mistakes here:
PHP код:
new string[128], giveplayerid, theloai, price;
if(sscanf(params, "u", giveplayerid, theloai, price)) return SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /thachdau [playerid] [dausung/duaxe] [price]");
You didn't declare theloai as a string (even though later on you use it as a string).
You only scan the string for a playerid, you forgot theloai and price.
See if this fixes it.
PHP код:
new string[128], giveplayerid, theloai[7], price;
if(sscanf(params, "us[7]i", giveplayerid, theloai, price)) return SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /thachdau [playerid] [dausung/duaxe] [price]");