INI stock causes "Unknown Command" message
#7

Quote:
I know this is irrelevant but the 'SaveTuning' could be considerably more optimised by only using one loop and if statements instead of however many loops you have there.

And why are you creating arrays of size of 1 like this one? new spoiler[20][0];? That is just wasteful and shouldn't be done, as you can easily do 'new spoiler[20];' which will do the same thing, except not wasting memory. if(componentid == spoiler[s][0]) would turn into if(componentid == spoiler[s]).


I know it's annoying to look at, but let's not focus on the small things just yet. Those loops are copied straight from the Wiki tutorial and I didn't bother to optimize them for my code so far (but I surely will). Thank you anyway.

Off-topic:
Quote:

That is just wasteful

Is it really? In both cases the array has 20 elements, so the size should be equal (but I'm aware that this "method" is still completely illogical ).
/Off-topic

I did the other things though and got something interesting. The stock stops working on line 'INI_Close(CarFile);'. Here's the debug info from crash detect: https://pastebin.com/itAqD7Rm

Where should I start looking for the out-of-bounds array? I figured it could be in those badly written loops.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)