SA-MP Forums Archive
random spawn 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: random spawn help (/showthread.php?tid=271128)



random spawn help - tanush - 23.07.2011

pawn Код:
new Float:spawn[][3] =
{
    {404.1312,2452.7603,16.5000},
    {1852.3341,-2547.9702,13.5469},
    {-1295.3973,-352.7942,14.1484}
};
new Float:deagle[][5] =
{
    {2874.7554,1076.2385,46.8451},
    {2861.5366,1079.0875,46.7841},
    {2856.9751,1058.9896,46.7861},
    {2876.2344,1056.9565,46.8220}
};
new Float:minigun[][4] =
{
    {2218.0930,1613.6779,999.9827},
    {2205.0100,1609.0273,999.9718},
    {2180.4021,1577.7986,999.9664},
    {2232.4795,1583.0991,999.9641}
};
i had minigun and spawn work fine but when i added deagle my pawno gets crashed. how i fix it


Re: random spawn help - Kitten - 23.07.2011

pawn Код:
new Float:deagle[][4] = //woops
{
    {2874.7554,1076.2385,46.8451},
    {2861.5366,1079.0875,46.7841},
    {2856.9751,1058.9896,46.7861},
    {2876.2344,1056.9565,46.8220}
};



Re: random spawn help - JaTochNietDan - 23.07.2011

Quote:
Originally Posted by Kitten
Посмотреть сообщение
pawn Код:
new Float:deagle[][4] =
{
    {2874.7554,1076.2385,46.8451},
    {2861.5366,1079.0875,46.7841},
    {2856.9751,1058.9896,46.7861},
    {2876.2344,1056.9565,46.8220}
};
You've gotten it wrong too! You're adding an extra cell in there that's never initialized. There's 3 cells being used in the second dimension!

pawn Код:
new Float:deagle[][3] =
{
    {2874.7554,1076.2385,46.8451},
    {2861.5366,1079.0875,46.7841},
    {2856.9751,1058.9896,46.7861},
    {2876.2344,1056.9565,46.8220}
};
That would be correct!


Re: random spawn help - tanush - 23.07.2011

pawn Код:
new Float:spawn[][3] =
{
    {404.1312,2452.7603,16.5000},
    {1852.3341,-2547.9702,13.5469},
    {-1295.3973,-352.7942,14.1484}
};
new Float:deagle[][3] =
{
    {2874.7554,1076.2385,46.8451},
    {2861.5366,1079.0875,46.7841},
    {2856.9751,1058.9896,46.7861},
    {2876.2344,1056.9565,46.8220}
};
new Float:minigun[][4] =
{
    {2218.0930,1613.6779,999.9827},
    {2205.0100,1609.0273,999.9718},
    {2180.4021,1577.7986,999.9664},
    {2232.4795,1583.0991,999.9641}
};
shit its still crashing pawno compiler library has stopped working


Re: random spawn help - Bob_Raw - 23.07.2011

Try And Re-Download the Pawno Scripting software


Re: random spawn help - tanush - 23.07.2011

done and it still crash, ill tryto fix it


Re: random spawn help - iPLEOMAX - 23.07.2011

The number you put here isn't how many lines you have, it is how many vars you are storing..
So, "3" here is X,Y,Z

Try this:
pawn Код:
new Float:spawn[][3] =
{
    //  X(1)      Y(2)    Z(3)
    {404.1312,2452.7603,16.5000},
    {1852.3341,-2547.9702,13.5469},
    {-1295.3973,-352.7942,14.1484}
};
new Float:deagle[][3] =
{
    {2874.7554,1076.2385,46.8451},
    {2861.5366,1079.0875,46.7841},
    {2856.9751,1058.9896,46.7861},
    {2876.2344,1056.9565,46.8220}
};
new Float:minigun[][3] =
{
    {2218.0930,1613.6779,999.9827},
    {2205.0100,1609.0273,999.9718},
    {2180.4021,1577.7986,999.9664},
    {2232.4795,1583.0991,999.9641}
};
And i think your pawno is crashing for some other reason..


Re: random spawn help - tanush - 23.07.2011

thank you man, its not crashing now when i put all 3 xD


Re: random spawn help - iPLEOMAX - 23.07.2011

Quote:
Originally Posted by tanush
Посмотреть сообщение
thank you man, its not crashing now when i put all 3 xD
cool then.