SA-MP Forums Archive
random checkpoint - please help - 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: random checkpoint - please help (/showthread.php?tid=513180)



random checkpoint - please help - Miladajir - 14.05.2014

hello
i have problem.
-----------------
new Float: trucker1[5][5] = {
{2788.1924,-2418.2754,13.6336, 3.0},
{2147.6301,-80.7979,2.8140, 3.0},
{-302.0700,1522.0327,75.3594, 3.0},
{-2060.5906,-2519.7815,30.4688, 3.0},
{-2798.7510,-385.9337,6.9702, 3.0}
};
new Float: trucker2[5][5] = {
{2788.1924,-2418.2754,13.6336, 3.0},
{2147.6301,-80.7979,2.8140, 3.0},
{-302.0700,1522.0327,75.3594, 3.0},
{-2060.5906,-2519.7815,30.4688, 3.0},
{-2798.7510,-385.9337,6.9702, 3.0}
};
-----------------
Line 67 & 68
new rand = random(sizeof(trucker1));
SetPlayerCheckpoint(playerid, trucker1[rand][0], trucker1[rand][1], trucker1[rand][2], trucker1[rand][3], trucker1[rand][4]);
-----------------
Line 86 & 87
new rand = random(sizeof(trucker2));
SetPlayerCheckpoint(playerid, trucker2[rand][0] ,trucker2[rand][1] ,trucker2[rand][2], trucker2[rand][3], trucker2[rand][4]);
-----------------
to compile:
Код:
D:\Game\GTA 5\GTA.San.Andreas - Server\filterscripts\a.pwn(68) : warning 202: number of arguments does not match definition
D:\Game\GTA 5\GTA.San.Andreas - Server\filterscripts\a.pwn(87) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
-----------------
please help.
thanks
-----------------
sorry, my bad english


Re: random checkpoint - please help - Madd92 - 14.05.2014

Quote:
Originally Posted by Miladajir
Посмотреть сообщение
new Float: trucker1[5][5]
You only have four values so it should be new Float:trucker1[5][4]. Then just use trucker1[rand][0-3] in SetPlayerCheckPoint.


Re: random checkpoint - please help - Miladajir - 14.05.2014

thanks for help