Game Development Community

Real quick eval() question

by Drew -Gaiiden- Sikora · in Torque Game Builder · 11/28/2005 (10:25 pm) · 2 replies

I'm using eval() on a function that takes string parameters. Currently I'm doing this:
for (%player = 1; %player < 5; %player++)
{
    %param1 = "controller";
    %param2 = "value";
    eval("%tempData = TorqueDB.searchByInstanceWithClass(%param1, %param2, $player" @ %player @ ".controller);");
    ...
    ...
}
Is there a way I can still include the string values without having to store them in locals first? I don't really mind doing it this way but I'm curious.

#1
11/28/2005 (10:32 pm)
Yes, like this:
eval("echo(\"Hello World!\");");
#2
11/29/2005 (12:41 am)
Thx!!