Jump to content
Sign in to follow this  
jeppelykke

Delete a tank3 and create tank3

Recommended Posts

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

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

I have version 1.46!

And i get that error sad_o.gif I also tryed nameing the Tank33, so it dont have same name as the marker but same error sad_o.gif

Error says:

'tank33 |#|= "M1Abrams" createVehicle getmarkerpos "tank3": Error Reserved variable in experssion

Share this post


Link to post
Share on other sites

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

' <- that it added infront of Tank3 is a stander maker i adds to all erros smile_o.gif

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 crazy_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×