Onworldlimit "string always evaluates to 0" RC3 (real thread)
by Sam M · in Torque Game Builder · 06/14/2006 (8:18 pm) · 3 replies
Sorry about the double post.
Not sure if this is really a bug or not but it seems to be a problem since this worked in previous version of TGB. I have the function:
t2dSceneObject::onWorldLimit(%this, %limitMode, %limit)
And whenever I use something like:
if(%limit == "top");
//code
I get ther error "string always evaluates to 0" and the code doesn't get run. When I try:
switch(%limit)
{
case "top":
//code
case "bottom":
//code
case "left":
//code
case "right":
//code
}
It'll run the code for the first case, but not the other 3. Am I missing something here? Or is the problem something else?
Thanks in advance
Not sure if this is really a bug or not but it seems to be a problem since this worked in previous version of TGB. I have the function:
t2dSceneObject::onWorldLimit(%this, %limitMode, %limit)
And whenever I use something like:
if(%limit == "top");
//code
I get ther error "string always evaluates to 0" and the code doesn't get run. When I try:
switch(%limit)
{
case "top":
//code
case "bottom":
//code
case "left":
//code
case "right":
//code
}
It'll run the code for the first case, but not the other 3. Am I missing something here? Or is the problem something else?
Thanks in advance
Torque Owner J. Alan Atherton