I don't know what else you have going on around this, and I haven't used (action_tile), so I'm not sure of the syntax, but I wonder: is there some reason not to just do this, and avoid the variables entirely?
(action_tile "edit1" "(RBox)")
(action_tile "edit2" "(Box)")
If there is, and also some reason you can't do it by localizing the variables as moshe-a suggests, then maybe you can solve it this way:
{code}
(if (= R 1)
(progn
(RBox)
(setq R nil)
); end progn
); end if
(if (= W 2)
(progn
(Box)
(setq W nil)
); end progn
); end if
{code}
--
Kent Cooper
kulfi wrote...
....values are not reset like when i close the program the values should be nil for both....
(action_tile "edit1" "(setq R 1)")
(action_tile "edit2" "(setq W 2)")
(if (= R 1) (RBox))
(if (= W 2) (Box))
Kent Cooper, AIA