Page 1 of 1
DeleteObject(id)
Posted: Mon Jul 23, 2012 5:47 pm
by enric
Something I'm not understanding, the following code crashes BA without any explanation.
Can someone help me, as I see Pip is not around.
id = GetTileObject(18, 18, 0) ;
Log ("GetTileObject: ", id); // I get a value here
if (id == -1)
{
// do nothing
}
else
{
DeleteObject(id);
}
Re: DeleteObject(id)
Posted: Thu Jul 26, 2012 4:52 pm
by pipfromslitherine
Can you post the error.log file after the crash to give some more info.
Thanks!
Cheers
Pip
Re: DeleteObject(id)
Posted: Thu Jul 26, 2012 7:56 pm
by enric
Error.log
UNKNOWN TAGS IN: CONFIG/SYSTEM.TXT
Unknown Tag: MOVIEMODE
Unknown Tag: DYNAMICENV
Unknown Tag: LAYOUTKILLSENEMYX,
END: CONFIG/SYSTEM.TXT
Creating Device.....
MonkeyInitStart
MIS: Found DD
MIS: IsHW
MIS: SetCoop
MIS: Setting Disp Mode
MIS: Done Init 3D Device
MIS: Tex Enum
MIS: SDRS
MIS: Init Decal Render
INITIAL LOAD 3170
Playing as: 0
WARNING: Trigger frame is outside the actual frames of the animation in DATA/BATTLE/UNITS/SDKFZ251_2_MORTAR.TXT (21, BOMBARD00)
SIDE 0
Still refed: /Applications/BA.app/Contents/Resources/Data/UI/UnitInfoPopup.bsf
Playing as: 0
SIDE 0
Re: DeleteObject(id)
Posted: Thu Jul 26, 2012 8:23 pm
by pipfromslitherine
OK - found the bug. Nasty - caused by some optimisations added for the iPad. It is fixed at this end, but we won't be doing an update for a while.
Cheers
Pip
Re: DeleteObject(id)
Posted: Thu Jul 26, 2012 8:43 pm
by enric
So, is there no way to delete a object until you make an update?
Re: DeleteObject(id)
Posted: Thu Jul 26, 2012 9:41 pm
by pipfromslitherine
Correct. Sorry about that. You could potentially move the object off the map or scale it to invisible (I checked the code and these should work fine).
Cheers
Pip