Help needed. - 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: Help needed. (
/showthread.php?tid=311815)
Help needed. -
iZN - 18.01.2012
Hello, i need help with this, i am very confused how to fix this?
I am making random spawns for it, don't know what to do with this.
These are the positions which are taken from the three commands. The error of arguments are coming of these last three lines.
pawn Код:
new rand = random(sizeof(spawns));
SetPlayerPos(playerid, RandomPlayerSpawnsSMG[rand][0], RandomPlayerSpawnsSMG[rand][1]);
SetPlayerPos(playerid, RandomPlayerSpawnsAK47[rand][0], RandomPlayerSpawnsAK47[rand][1]);
SetPlayerPos(playerid, RandomPlayerSpawnsKatana[rand][0], RandomPlayerSpawnsKatana[rand][1]);
This is the float for random spawns, everything is correct what's wrong with it?
pawn Код:
new Float:RandomPlayerSpawnsKatana[2][3] =
{ //KANTANADM
{1590.6189,2393.2646,22.8204},
{1626.6914,2389.0703,22.8204}
};
new Float:RandomPlayerSpawnsAK47[2][3] =
{ //AK47 DM
{2836.4141,-2407.7808,36.0648},
{2836.6094,-2487.6553,36.0648}
};
new Float:RandomPlayerSpawnsSMG[2][3] =
{ //SMG DM
{-87.3014,2261.1035,125.5600},
{27.0638,2243.3298,126.6797}
};
These are the errors:
Код:
(2114) : warning 202: number of arguments does not match definition
(2130) : warning 202: number of arguments does not match definition
(2179) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
My previous dm commands have none errors, but why these have errors?
Re: Help needed. -
HyperZ - 18.01.2012
You have not added Z coordinates that is why you are getting 'number of arguments' warnings.
By the way try this:
pawn Код:
new rand = random(sizeof(spawns));
SetPlayerPos(playerid, RandomPlayerSpawnsSMG[rand][0], RandomPlayerSpawnsSMG[rand][1], RandomPlayerSpawnsSMG[rand][2]);
SetPlayerPos(playerid, RandomPlayerSpawnsAK47[rand][0], RandomPlayerSpawnsAK47[rand][1], RandomPlayerSpawnsAK47[rand][2]);
SetPlayerPos(playerid, RandomPlayerSpawnsKatana[rand][0], RandomPlayerSpawnsKatana[rand][1], RandomPlayerSpawnsKatana[rand][2]);
Re: Help needed. -
iZN - 18.01.2012
Ah, didn't noticed that. Thanks an rep+ for you