Error Attempt to access deleted scene object Maxscript
Hello : I have item in array, and when max cannot find these items in scene it gives me error (error below). I want to create simple script that looks for these items in array and if it find it then delete it and it it doesn't then don't do anything. Or maybe Messaagebox "No items found in ALL_Call"
Global Lit = (Vraylight Name: "Test Light" Global Bx = (box length:462.647 width:412.084 height:414.003 pos:[135.56,686.408,0]) Local ALL_Call = #(Lit, Bx) if ALL_Call.count == 2 do (delete ALL_Call)
Error : Runtime error: Attempt to access deleted scene object
Hope you guys can help.
Thanks
Comments
...
Let say we have this case
bga
Thanks! This is helpful.
Thanks! This is helpful.
Here is more for what i am looking for. Currently I have a btn with function that adds Light and Box.
If i keep clicking the button it keeps adding new light and Box to the scene. I want to first tell it to delete if there is something in ALL_Call Array and then add the new one. But i get an Error "Attempting to access deleted scene object".
If there is ALL_Call array it work perfectly because it first deletes the ALL_Call array and then adds new one. But for the first time when i click it it doesn't work.
Thank you for all the help!
Cheers
...
You are doing all wrong.
First of all why do U constantley declaring lit, bx and all_call variables?
Second ALL_Call.count can't be undefined but number. Anyway...
Use simply
bga
Thank you! I don't know why
Thank you! I don't know why I was over complicating this.