Home AMX User Forum AMX General Discussion

Wierd WAIT_UNTIL Bug

There seems to be a bug in the NetLinx compiler when it comes to WAIT_UNTIL's inside functions. Take the following for example:
DEFINE_TYPE
STRUCTURE _sStructure {
    INTEGER nBar
}

DEFINE_VARIABLE
_sStructure uStructure

DEFINE_FUNCTION fnFoo (INTEGER nBar)
{
    WAIT_UNTIL (uStructure.nBar == FALSE)
    {
	// do something
    }
}

The compiler seems to have difficulty distinguishing between the nBar within the structure and nBar the function parameter. If you try and compile it'll throw:
Symbol [AutoWait[i]x[/i]] undefined in symbol table

Just though I'd share the love so that others don't have to go through the pain and torement of figuring out why the hell their code may not be compiling.

Comments

  • AuserAuser Posts: 506
    I seem to remember that the NetLinx compiler always chucks it when you have a variable with the same name as an element of a structure and an instance of the structure type is referred to in the same scope.
Sign In or Register to comment.