code stops and does not continue - 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: code stops and does not continue (
/showthread.php?tid=484891)
code stops and does not continue -
horsemeat - 02.01.2014
I have to big chunk of code and it seems to stop right here it hits the first 3 dots but not the last 3 I do have a lot of code before this function is called. Does code eventual stop if there is to much? Can can anyone fix this You can see the rest of the code in that section if you ask but I not sure if your going to make sense of it and there is a lot.
pawn Код:
stock Float:DivideFuel(refineryid, Float:fuelammount)
{
new oilstoragecount;
print("...");//remove
for(new count2 = 0;count2 < MAX_OILSTORAGE;count2++)
{
if((oilstoragestate[count2][refineryid])==1)
{
oilstoragecount++;
}
}
print("...");//remove
return fuelammount / oilstoragecount;
}//mark
Re: code stops and does not continue -
cessil - 02.01.2014
looks like it might be accessing an index out of bounds in the array, which would make it stop
Re: code stops and does not continue -
horsemeat - 02.01.2014
Thanks I used the wrong constant in the loop