SA-MP Forums Archive
Number of arguments does not match the definition... - 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: Number of arguments does not match the definition... (/showthread.php?tid=513039)



Number of arguments does not match the definition... - Fresh99012 - 14.05.2014

Код:
	new buldozer = CreateVehicle(522,673.4075,927.5541,-41.2578,143.4993,0xFFDD00FF,0xFFDD00FF,180);
	new buldozertablica[128] = "40817231";
	SetVehicleNumberPlate(buldozer,"%s",buldozertablica);
(45) : warning 202: number of arguments does not match definition

This is line 45:
Код:
SetVehicleNumberPlate(buldozer,"%s",buldozertablica);



Re: Number of arguments does not match the definition... - iZN - 14.05.2014

You need to use format and there is no third parameter! https://sampwiki.blast.hk/wiki/SetVehicleNumberPlate

pawn Код:
static str[32];
format(str, sizeof(str), "%s", buldozertablica);
SetVehicleNumberPlate(buldozer, str);



Re: Number of arguments does not match the definition... - Vince - 14.05.2014

Stupid. You're not adding anything new into the string, so why not use the original variable in the first place?