Annoying warning
#1

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 }
};
Reply
#2

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.
Reply
#3

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.");
    }
    }
    }
Reply
#4

Kaiser wants to see the actual function.

stock CreateDynamicCP. It should be in the include? Search for it.
Reply
#5

There is no "stock",there is a public,that i pasted above.
Reply
#6

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.
Reply
#7

one too many -1s being passed...

ty spedico
Reply
#8

Thanks speedico,i fixed.
Reply
#9

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 ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)