SA-MP Forums Archive
big big strange problem omg?!!? - 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: big big strange problem omg?!!? (/showthread.php?tid=138769)



big big strange problem omg?!!? - Headshot1108 - 03.04.2010

lol first hello i have a quit strange problem
i really need help, and i don't know whether can anyone help me.

my pawno crashs if i make that:

new Float:CPLocations[2][4] =
{
{-298.1169,1538.4077,75.5625},
{-618.6441,1843.9636,22.9245}
};

to

new Float:CPLocations[3][4] =
{
{-298.1169,1538.4077,75.5625},
{-618.6441,1843.9636,22.9245}
};

and as test i removed the function, so its never used but it still crashs ?!?!

-.-


// Edit: its not only at this, i removed this and it still crashs


Re: big big strange problem omg?!!? - cessil - 03.04.2010

well if it crashes when it's not in the script, maybe its not part that's crashing pawno


Re: big big strange problem omg?!!? - Babul - 03.04.2010

well, you accidently swapped the sizes in the array:
the first one [3] sets how broad your array is, like:
Код:
new Float:CPLocation[3]=
{
1000.0000,
1010.0000,
1020.0000
};
it could be written like nested (in backets) aswell:
Код:
new Float:CPLocation[3]=
{
{1000.0000},
{1010.0000},
{1020.0000}
};
if you add one more dimension (height, or depth) to that array, its the sub-part of each:
Код:
new Float:CPLocation[3][3]=
{
{1000.0000,1001.0000,1002.0000},
{1010.0000,1011.0000,1012.0000},
{1020.0000,1021.0000,1022.0000}
};
i suggest that amount of random locations for you:
Код:
new Float:CPLocations[][3] =//the [] is undefined, feel free to add more {,,} coords...
{
{-298.1169,1538.4077,75.5625},
{-618.6441,1843.9636,22.9245}
};



Re: big big strange problem omg?!!? - Headshot1108 - 03.04.2010

no it is not because of that because the locations work. Well I find the problem.. Only windows 98 know why it crash. I have win 7 and done a time ago the pawno compatibility to win 98 and now i set to win 7 and doesnt crash now.