parse errors with Con::Evaluate
by Justin Mosiman · in Torque Game Builder · 07/25/2009 (2:06 pm) · 3 replies
Hello,
I'm working on networking in my game, and when a user wants to connect to a server they are given a list of buttons with IP addresses on them to choose from if there is more than one server available. This all goes well and everything, except on that button I want to set the command to pass the IP to a different function. This has lead me to discover a strange error when I try to set the command.
To simply things, the function and button command are set as:
When I push the button, I get this error:
Making things simpler, I set command to "echoFunction(192 168 0 1);" to see if there was a problem with periods. Nope:
Thinking it could be a problem with non-alpha numeric characters, I tried "echoFunction(192a168a0a1);" but it still failed.
What's going on here? Anybody else seen this before?
I'm working on networking in my game, and when a user wants to connect to a server they are given a list of buttons with IP addresses on them to choose from if there is more than one server available. This all goes well and everything, except on that button I want to set the command to pass the IP to a different function. This has lead me to discover a strange error when I try to set the command.
To simply things, the function and button command are set as:
new GuiButtonCtrl(Select) {
...
Command = "echoFunction(192.168.0.1);";
...
};
....
function echoFunction(%echoText)
{
echo(%echoText);
}When I push the button, I get this error:
Quote:
parse error
Con::Evaluate(echoFunction(192.168.0.1);) failed
Making things simpler, I set command to "echoFunction(192 168 0 1);" to see if there was a problem with periods. Nope:
Quote:
parse error
Con::Evaluate(echoFunction(192 168 0 1);) failed
Thinking it could be a problem with non-alpha numeric characters, I tried "echoFunction(192a168a0a1);" but it still failed.
What's going on here? Anybody else seen this before?
Associate Phillip O'Shea
Violent Tulip