Annoying warning - 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: Annoying warning (
/showthread.php?tid=345118)
Annoying warning -
Face9000 - 23.05.2012
warning 202: number of arguments does not match definition
pawn Код:
CreateDynamicCP(Destinations[rand][0], Destinations[rand][1], Destinations[rand][2], 3.0, -1,-1,-1,-1,100.0);
Here is the destinations:
pawn Код:
new Float:Destinations[5][3] = {
{ 2401.7175,-1506.1350,23.5402 },
{ 1191.0847,-888.5489,42.7969 },
{ -69.6424,-1162.2354,1.5007 },
{ 334.1184,-1340.1366,14.2125 },
{ 481.7301,-1533.2468,19.6644 }
};
Re: Annoying warning -
kaisersouse - 23.05.2012
Its not the destinations, its the number of arguments used in the CreateDynamicCP function. We'd have to see the CreateDynamicCP function in order to know how many parameters its looking for when you call it.
Re: Annoying warning -
Face9000 - 23.05.2012
Quote:
Originally Posted by kaisersouse
Its not the destinations, its the number of arguments used in the CreateDynamicCP function. We'd have to see the CreateDynamicCP function in order to know how many parameters its looking for when you call it.
|
I use Incognito streamer so i've to use CreateDynamicCp and create the checkpoint when a player types /mission.
Howerer,here is:
pawn Код:
if(checkpointid == CPs[3])
{
if(IsATruck(GetPlayerVehicleID(playerid)))
{
if(truckloaded == 1)
{
SendClientMessage(playerid, yellow, "You've delivered the goods,and the company has paid you 1500$ for delivering them.");
GameTextForPlayer(playerid,"~g~Delivered completed! You received 1500$",4000,5);
GivePlayerMoney(playerid, 1500);
truckloaded = 0;
DisablePlayerCheckpoint(playerid);
}
else
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, yellow, "You have apparently lost your truck/van,and the trucking route has been cancelled.");
}
}
}
Re: Annoying warning -
Pizzy - 23.05.2012
Kaiser wants to see the actual function.
stock CreateDynamicCP. It should be in the include? Search for it.
Re: Annoying warning -
Face9000 - 23.05.2012
There is no "stock",there is a public,that i pasted above.
Re: Annoying warning -
spedico - 23.05.2012
Stock:
pawn Код:
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
That's 8 arguments.
Yours:
pawn Код:
CreateDynamicCP(Destinations[rand][0], Destinations[rand][1], Destinations[rand][2], 3.0, -1,-1,-1,-1,100.0);
And there you have 9. Remove one.
Re: Annoying warning -
kaisersouse - 23.05.2012
one too many -1s being passed...
ty spedico
Re: Annoying warning -
Face9000 - 23.05.2012
Thanks speedico,i fixed.
Re: Annoying warning -
Pizzy - 23.05.2012
Quote:
Originally Posted by Logitech90
There is no "stock",there is a public,that i pasted above.
|
That public has nothing to do with the function, and is not the function ...