DestroyDynamicObject destroying the wrong object
#1

And I have no idea why.

PHP Code:
// top of the gamemode
new obTown[300];
new 
obTemp;
// GameModeInit
obTown[0] = CreateDynamicObject(23322330.53412392.489511.74540.00000.00000.0000);
obTown[1] = CreateDynamicObject(81682293.59832370.78958.16950.00000.000016.6998); // and so on...
// somewhere else in the code 
if(IsValidDynamicObject(obTemp)) DestroyDynamicObject(obTemp); // HERE IS THE PROBLEM 
Simple enough, should work, right?
Well, for god knows what reason the last line deletes obTown[0] object, even thought I've added IsValidDynamicObject(obTemp), and obTemp wasn't created yet. So why on earth does the last code delete obTown[0]?
Primo, the code after IsValidDynamicObject(obTemp) should not execute. Secundo, it should not even a random object when it cannot find obTemp.
Am I missing something here?
Reply


Messages In This Thread
DestroyDynamicObject destroying the wrong object - by Amads - 05.05.2018, 20:23
Re: DestroyDynamicObject destroying the wrong object - by SeanDenZYR - 06.05.2018, 02:30
Re: DestroyDynamicObject destroying the wrong object - by Amads - 06.05.2018, 07:42

Forum Jump:


Users browsing this thread: 1 Guest(s)