26.04.2011, 06:40
Quote:
someone posted a while ago that destroyobject(objectid); does not reset the objectid to INVALID_OBJECT_ID, well its true and its in even more dept.
I confirmed that bug and found another bug while in it. try a code like this pawn Code:
but see i am destroying the object again in a timer, so the objectid is still 1 let someone spawn again! within 10 seconds, and instead it wouldn't destroy object id 2, it would destroy objectid 1 even with IsValidObject(objectid); this bug still happens! simple explanation: because destroyobject isn't resetting the variable, its causing other bugs. Example: i am create missiles, when i fire missiles, so when i destroy the object, and do some other checks, it destroys the wrong objectid |