jeppelykke 0 Posted June 2, 2003 Hey Hey all, How do one delete a var again so i can use the same name exsample of my script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #tank3 deleteVehicle tank3 tank3 = nil ~5 tank3 = "M1Abrams" createVehicle getmarkerpos "tank3" Reason i have tank3 = nil is that in the "comref" it says that would: Description: Â Nil value. This value can be used to undefine existing variable. Example: Â variableToDestroy = nil But when i try to create the same tank it says that the name/var is still in use, anyone have and idea how i can fix that. AND Yes that tank has to be same name! ;) Share this post Link to post Share on other sites
Chris Death 0 Posted June 2, 2003 hmm - i've tried following: radio-alpha starts the first script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> <veh_cre.sqs> tank3 = "M1Abrams" createVehicle getmarkerpos "tank3" exit radio bravo starts the second script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> <veh_cre.sqs> deleteVehicle tank3 tank3 = nil exit Now i've tried that more than once and it worked everytime fine for me. radio-alpha and *whooop* - the tank appeared radio-bravo and *flush* the tank has gone no error messages popping up for me First i thought your error could have been caused by the name of the marker "tank3", but as you can see i've been using the very same markername and it still worked fine. :edit - just to make sure, i'm using version 1.91 ~S~ Â CD Share this post Link to post Share on other sites
jeppelykke 0 Posted June 3, 2003 I have version 1.46! And i get that error I also tryed nameing the Tank33, so it dont have same name as the marker but same error Error says: 'tank33 |#|= "M1Abrams" createVehicle getmarkerpos "tank3": Error Reserved variable in experssion Share this post Link to post Share on other sites
AXE 0 Posted June 3, 2003 maybe tank33 instead of 'tank33 ? also, getmarkerpos "tank3" => does this mean that there is a marker named tank3? because that would cause problems. Share this post Link to post Share on other sites
jeppelykke 0 Posted June 4, 2003 ' <- that it added infront of Tank3 is a stander maker i adds to all erros And yes the maker is called: tank3 I even as wrote before change the tank3 name to tank33 to see if that made a driffent so it diden both have a tank3 name and markername with same var! But it still came with that error Share this post Link to post Share on other sites