Hello this could be a something im doing wrong. But i think my scripts speaks for it self.
The first panel is created local, with pan-create Later i remove that panel, and then i create another pan_create local panel.
The thing is , because i removed the first using a different function, that same one will remove the 2nd panel.
CHECK LINE 35 of the included attached script, which is the fade out panel function that will also fade the new created panel, with no pointer or reason to do so ( i THINK)
its 1 file , the whole script is 69 lines. And its very easy to read
Last edited by MMike; 07/01/1017:11.
Re: Bug in pan_create, PANEL Dissapears
[Re: MMike]
#331035 07/01/1017:1007/01/1017:10
No, ptr_remove can not remove two panels at once. This looks like a typical script bug, such as accessing pointers to already-removed objects.
Unfortunately your script does not speak for itself... When writing scripts, make it a habit to have clear structured code. Use indentations and don't clutter lines with rat's nests of commands. Then other people and yourself have a better chance to see what the script is doing. Be always aware of when pointers are valid and when not, and don't pass pointers to coroutines while removing them in other functions. Then such problems won't happen. If they do, they might really be engine bugs.
Re: Bug in pan_create, PANEL Dissapears
[Re: jcl]
#331093 07/01/1021:0607/01/1021:06
im not sure if i understood, but, i did not removed a poiter of an already removed pointer, nor acessing a pointer of a removed pointer..
i create the 1st panel, then i fade it out,then remove it with ptr_remove (now here, could is the problem , because it will remove a fading panel, and wont wait for it) Anyway later on main(), i use the wait_for function to check when the panel is removed...
then i create a new panel.. but that panel is somehow affected because the 1st one, that has nothing to do with the 2nd. thats what made me wonder