catventure
28-11-2005, 16:37
Hi,
Built a new function into my adventure project to deal with game settings and have come up against an if/then error by thinbasic:
Script Run Time Error
error code 9
THEN expected
Line code 'If tempval>0 & tempval<501 THEN
token found TEMPVAL
On the TB StatusBar it says: THEN expected: TEMPVAL
Extract from my function code:
control get text hdlg, 930 to tempstr
tempval=val(tempstr)
if tempval >0 & tempval <501 then
startloc=tempval
else
msgbox (0,"Invalid Location Number",%MB_OK or %MB_ICONEXCLAMATION,"T.A.B. Information")
end function
end if
tempval is global and have used it in other funcs without any errors like this before.
I'll continue trying to hunt down the cause...
catventure.
Built a new function into my adventure project to deal with game settings and have come up against an if/then error by thinbasic:
Script Run Time Error
error code 9
THEN expected
Line code 'If tempval>0 & tempval<501 THEN
token found TEMPVAL
On the TB StatusBar it says: THEN expected: TEMPVAL
Extract from my function code:
control get text hdlg, 930 to tempstr
tempval=val(tempstr)
if tempval >0 & tempval <501 then
startloc=tempval
else
msgbox (0,"Invalid Location Number",%MB_OK or %MB_ICONEXCLAMATION,"T.A.B. Information")
end function
end if
tempval is global and have used it in other funcs without any errors like this before.
I'll continue trying to hunt down the cause...
catventure.