How to execute a variable??
by AIDan · in Torque Game Engine · 12/17/2001 (5:01 am) · 2 replies
%command= "echo("done.");How can I run this command??
greetings
Daniel
About the author
by AIDan · in Torque Game Engine · 12/17/2001 (5:01 am) · 2 replies
%command= "echo("done.");
Torque Owner Chris "Dark" Evans
This is also helpful if you need to set a global variable that would normally give you a syntax error.
// this would normally give you a syntax error: $GlobalVar::[%whatever] = %whatever2; // this is an alternative: eval("$GlobalVar::" @ %whatever @ " = " @ %whatever2 @ ";");If you put a bracket next to the double colons like that it gives you an error. But you could do:
Torque's scripting language is very versitile, it can do almost anything.
Dark