Random checkpoint problem, help please.
#1

Hello guys i'm develping a FS for pizza boy job but i've got a problem with my random checkpoints:

pawn Код:
CMD:deliverpizza(playerid, params[])
{
    if(GetPVarInt(playerid, "InPizzaIntruder") && IsPlayerInRangeOfPoint(playerid, 10.0, 2124.5547,-1803.9019,13.5547))
    {
    new rand = random(sizeof(RandomCheckpoint));
    SetPlayerCheckpoint(playerid, RandomCheckpoint[rand][0], RandomCheckpoint[rand][1], RandomCheckpoint[rand][2], RandomCheckpoint[rand][3], RandomCheckpoint[rand][4], RandomCheckpoint[rand][5], RandomCheckpoint[rand][6], RandomCheckpoint[rand][7], RandomCheckpoint[rand][8], RandomCheckpoint[rand][9]);
    if (GetPVarType(playerid, "Delivering"))
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You are already delivering pizzas !");
    }
    } else {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You have to be in pizza boy intruder to use this command !");
    }
    return 1;
}
I get
Quote:

C:\Users\Pavel\Desktop\Pizza Boy Project\pbjob.pwn(216) : warning 202: number of arguments does not match definition
C:\Users\Pavel\Desktop\Pizza Boy Project\pbjob.pwn(216) : warning 202: number of arguments does not match definition
C:\Users\Pavel\Desktop\Pizza Boy Project\pbjob.pwn(216) : warning 202: number of arguments does not match definition
C:\Users\Pavel\Desktop\Pizza Boy Project\pbjob.pwn(216) : warning 202: number of arguments does not match definition
C:\Users\Pavel\Desktop\Pizza Boy Project\pbjob.pwn(216) : warning 202: number of arguments does not match definition
C:\Users\Pavel\Desktop\Pizza Boy Project\pbjob.pwn(216) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Warnings.

The line 216 is the one that says SetPlayerCheckpoint..
I've tryed with only 4 checkpoints and it worked.. but if it's with all 10 of them it's not working.. how to include all of the 10 checkpoints. please help me.
Reply
#2

pawn Код:
CMD:deliverpizza(playerid, params[])
{
    if(GetPVarInt(playerid, "InPizzaIntruder") && IsPlayerInRangeOfPoint(playerid, 10.0, 2124.5547,-1803.9019,13.5547))
    {
    new rand = random(sizeof(RandomCheckpoint));
    SetPlayerCheckpoint(playerid, RandomCheckpoint[rand][0], RandomCheckpoint[rand][1], RandomCheckpoint[rand][2],3);
    if (GetPVarType(playerid, "Delivering"))
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You are already delivering pizzas !");
    }
    } else {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You have to be in pizza boy intruder to use this command !");
    }
    return 1;
}
Reply
#3

That does not help me.... i said i tryed with lower amount of checkpoints... i need all of the checkpoints not 3 or 4.
Reply
#4

Line 216 is?

And this:
PHP код:
 } else {
        
SendClientMessage(playeridCOLOR_LIGHTRED"You have to be in pizza boy intruder to use this command !");
    }
    return 
1;

Need to be:

PHP код:
else {
        
SendClientMessage(playeridCOLOR_LIGHTRED"You have to be in pizza boy intruder to use this command !");
    }
    return 
1;

Reply
#5

Quote:
Originally Posted by B-Matt
Посмотреть сообщение
Line 216 is?

And this:
PHP код:
 } else {
        
SendClientMessage(playeridCOLOR_LIGHTRED"You have to be in pizza boy intruder to use this command !");
    }
    return 
1;

Need to be:

PHP код:
else {
        
SendClientMessage(playeridCOLOR_LIGHTRED"You have to be in pizza boy intruder to use this command !");
    }
    return 
1;

There is nothing wrong with that line, and if you just read the post again,you'd see that the problem is in the SetPlayerCheckpoint.
Quote:

The line 216 is the one that says SetPlayerCheckpoint..

Reply
#6

Does anyone has a solution for this or ?
Reply
#7

How did you declare your array?
Show that once.

It should be like
pawn Код:
new Float:RandomCheckpoint[][]= {
//the rest of your array
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)