[Awaiting Help Still] Help With Floats - 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: [Awaiting Help Still] Help With Floats (
/showthread.php?tid=200286)
[Awaiting Help Still] Help With Floats -
Sledge - 18.12.2010
pawn Код:
new Float:RandomMexicanSpawn[5][3] = {
{-885.5172,2745.8201,46.0000}, // 1
{-815.5597,2765.8616,46.0000}, // 2
{-788.9110,2758.9719,48.2556}, // 3
{-791.6806,2712.2090,45.8814}, // 4
{-852.2746,2792.9856,46.3759}, // 5
};
error 018: initialization data exceeds declared size
Re: Help With Floats -
admantis - 18.12.2010
which line is the error coming from?
btw I copy paste that code in my script and I dont have errors..
Re: Help With Floats -
The_Gangstas - 18.12.2010
pawn Код:
new Float:RandomMexicanSpawn[][3] = {
{-885.5172,2745.8201,46.0000}, // 1
{-815.5597,2765.8616,46.0000}, // 2
{-788.9110,2758.9719,48.2556}, // 3
{-791.6806,2712.2090,45.8814}, // 4
{-852.2746,2792.9856,46.3759}, // 5
};
Re: Help With Floats -
Sledge - 18.12.2010
^^ Didn't work
Here is another code that is giving me errors that invovles the float:
pawn Код:
new rand;
rand = random(sizeof(RandomMexicanSpawn)-2)+1;
SetPlayerPos(playerid, RandomMexicanSpawn[rand][0], RandomMexicanSpawn[rand][1], RandomMexicanSpawn[rand][2])
EDIT:
As soon as I removed that code ^^ I had no errors.
Re: [Awaiting Help Still] Help With Floats -
Sledge - 18.12.2010
bump
Re: [Awaiting Help Still] Help With Floats -
MrDeath537 - 18.12.2010
Try using it:
pawn Код:
new Float:RandomMexicanSpawn[][] =
{
{-885.5172,2745.8201,46.0000},
{-815.5597,2765.8616,46.0000},
{-788.9110,2758.9719,48.2556},
{-791.6806,2712.2090,45.8814},
{-852.2746,2792.9856,46.3759}
};
It should work.
Re: [Awaiting Help Still] Help With Floats -
Sledge - 18.12.2010
Thanks bro ^^