SA-MP Forums Archive
Help please - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help please (/showthread.php?tid=204005)



Help please - bartje01 - 28.12.2010

Alright. I want to make random checkpoints but I don't get what's wrong here.

pawn Код:
SetPlayerCheckpoint(playerid, Randompost[rand][0], Randompost[rand][1],Randompost[rand][2]);
It says:
pawn Код:
C:\Users\Michael\Desktop\maxlifedontdelete\filterscripts\postmission.pwn(137) : warning 202: number of arguments does not match definition



Re: Help please - MadeMan - 28.12.2010

https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint

Size is missing.


Re: Help please - blackwave - 28.12.2010

Correct structure:
Код:
SetPlayerCheckpoint(playerid, Pos:x, Pos:y, Pos:z, Float:size);



Re: Help please - bartje01 - 28.12.2010

Wait don't get it:

Can someone fix it?

pawn Код:
new Float:Randompost[][13] =
{
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872},
    {2495.2620,-1690.3857,14.7656,176.5872}
};

pawn Код:
new rand = random(sizeof(Randompost));
    SetPlayerCheckpoint(playerid,Randompost[rand][0], Randompost[rand][1],Randompost[rand][2],Randompost[rand][3],Randompost[rand][4],Randompost[rand][5],Randompost[rand][6],Randompost[rand][7],Randompost[rand][8],Randompost[rand][9],Randompost[rand][10],Randompost[rand][11],Randompost[rand][11]);