Problem with removing items from TList

BlitzMax Forums/BlitzMax Programming/Problem with removing items from TList

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Are you sure you are using Strict, I do not think that would compile, you have a variable called temp which is not declared (in the Foreach loop). If temp is an Int I do not think it will work like that. You can either make it an object or make it a string.

Let us say you have TPlants in that list, then I would do something like this to loop it: (using Strict)
For local Plant:TPlant = Eachin ObjectList
    If Plant.Collide() ObjectList.Remove( Plant )
Next 
Also I would recommend using ObjectsList.Remove( temp ) instead of ListRemove(objectsList,temp)
as it is easier to read, but that is merly personal preference :)

Hope that helps.