[Awaiting Help Still] Help With Floats
#1

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
Reply
#2

which line is the error coming from?
btw I copy paste that code in my script and I dont have errors..
Reply
#3

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
};
Reply
#4

^^ 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.
Reply
#5

bump
Reply
#6

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.
Reply
#7

Thanks bro ^^
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)