SA-MP Forums Archive
Need help with Jail system +1 rep - 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: Need help with Jail system +1 rep (/showthread.php?tid=322369)



Need help with Jail system +1 rep - trapped1 - 01.03.2012

Код:
	new rand;
	rand = random(sizeof(gPrisonSpawns));

DOO_SetPlayerPos(playerid, gPrisonSpawns[rand][0],gPrisonSpawns[rand][1], gPrisonSpawns[rand][2], gPrisonSpawns[rand][3], gPrisonSpawns[rand][4], gPrisonSpawns[rand][5], gPrisonSpawns[rand][6], gPrisonSpawns[rand][7], gPrisonSpawns[rand][8]);//this line
In this line is giving me error:

Код:
warning 202: number of arguments does not match definition
Код:
new Float:gPrisonSpawns[8][10] = {
	{157.3793,-203.4345,342.9255},
	{162.1676,-202.7620,342.9255},
	{171.3522,-182.2133,346.9245},
	{166.1989,-182.3452,346.9245},
	{167.2288,-202.7806,346.9321},
	{162.6096,-202.5095,346.9330},
	{162.4220,-182.0654,342.9255},
	{157.6658,-181.8451,342.9255}
};



Re: Need help with Jail system +1 rep - Supercop - 02.03.2012

comma behind "{157.6658,-181.8451,342.9255}" ?


Re: Need help with Jail system +1 rep - Min - 02.03.2012

Quote:
Originally Posted by Supercop
Посмотреть сообщение
comma behind "{157.6658,-181.8451,342.9255}" ?
No need to add comma at the last one, and he said, he got the error from this line:
pawn Код:
DOO_SetPlayerPos(playerid, gPrisonSpawns[rand][0],gPrisonSpawns[rand][1], gPrisonSpawns[rand][2], gPrisonSpawns[rand][3], gPrisonSpawns[rand][4], gPrisonSpawns[rand][5], gPrisonSpawns[rand][6], gPrisonSpawns[rand][7], gPrisonSpawns[rand][8]);//this line
I guess it should be:
pawn Код:
DOO_SetPlayerPos(playerid, gPrisonSpawns[rand][0],gPrisonSpawns[rand][1], gPrisonSpawns[rand][2]);