SA-MP Forums Archive
Argument Mismatch - 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: Argument Mismatch (/showthread.php?tid=392152)



Argument Mismatch - Dennis_Smith - 13.11.2012

Код:
94	new setplate;
95	if (strmid(setplate,cmdtext,0,9) && setplate == "/setplate "){
Код:
(95) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
I'm trying to solve this error. Not sure exactly what I'm supposed to fix. I added the setplate and "/setplate" comparison because anything with a / in front of it, cause the function to run. I need it to detect a command /setplate with a number after it and a space. (ex: "/setplate 777" will set the plate to 777.) I've created a variable to pull out the first 10 characters to check for /setplate. Thanks for any help.


Re: Argument Mismatch - Azazelo - 13.11.2012

Quote:

new setplate[12];

4 char


Re: Argument Mismatch - Dennis_Smith - 13.11.2012

I did that, now I get
Код:
(95) : error 033: array must be indexed (variable "setplate")
How do I index arrays?