argument type mismatch (argument 1) - 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 type mismatch (argument 1) (
/showthread.php?tid=507064)
argument type mismatch (argument 1) -
indraraynata - 15.04.2014
Код:
CMD:customplate(playerid, params[])
{
new plate[128];
if(!IsPlayerConnected(playerid) || PlayerInfo[playerid][pPlate] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use command.");
if(!IsPlayerInRangeOfPoint(playerid, 4, 2117.5835,-1153.0809,24.2201)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the tuning shop.");
if(sscanf(params, "s[128]", plate)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /customplate [number]");
format(plate, sizeof(plate), "%s", plate);
SetVehicleNumberPlate(PlayerVehicleInfo[playerid] , plate); <<-- This is the line
return 1;
}
Anyone please help
C:\Users\indra\Desktop\12-03-2014.pwn(34964) : error 035: argument type mismatch (argument 1)
Re: argument type mismatch (argument 1) -
Konstantinos - 15.04.2014
PlayerVehicleInfo[playerid] must be integer. And formatting plate with plate is pointless.
Re : argument type mismatch (argument 1) -
Ramoboss - 15.04.2014
try this
PHP код:
SetVehicleNumberPlate(PlayerVehicleInfo[playerid][pPlate] , plate); // i don't know if it works, but give it a shot ;)
Re: Re : argument type mismatch (argument 1) -
indraraynata - 15.04.2014
Quote:
Originally Posted by Ramoboss
try this
PHP код:
SetVehicleNumberPlate(PlayerVehicleInfo[playerid][pPlate] , plate); // i don't know if it works, but give it a shot ;)
|
I got this eror message
C:\Users\indra\Desktop\12-03-2014.pwn(34964) : error 032: array index out of bounds (variable "PlayerVehicleInfo")
Re: argument type mismatch (argument 1) -
Konstantinos - 16.04.2014
Ignore his post and show us how you declared
PlayerVehicleInfo.