Wierd Problem
Blitz3D Forums/Blitz3D Programming/Wierd Problem
| ||
I'm having trouble with some FreeEntity things. In blizdebugger it says "Entity Does not Exist." But it says in varible window, "mesh=127984081" Or what ever number. Can anybody help? Thanks |
| ||
The variable will still contain a number even if the entity is freed :o) Check it out: Graphics3D 800,600 SetBuffer BackBuffer() mesh = CreateCube() FreeEntity mesh Print " freed mesh variable = "+mesh While Not KeyHit(1) Wend |
| ||
OK that would the answer. Thanks. I will fix it. |
| ||
OK that wourld the answer. Thanks. I will fix it. |
| ||
to prevent this you can use something like mesh=myFreeEntity(mesh) function myFreeEntity(m) if m<>0 then freeentity m return 0 end function |
| ||
Just get used to using FreeEntity mesh : mesh = 0 every time. (I _still_ forget too.) |