Expression of type string array cannot be invoked

BlitzMax Forums/BlitzMax Programming/Expression of type string array cannot be invoked

slenkar(Posted 2008) [#1]
this line throws an error in strict mode but not in normal mode:


If object_type(bs.x , bs.y) = "barrel"


the error says: "Expression of type 'string array' cannot be invoked"


jsp(Posted 2008) [#2]
Looks like your function object_type(bs.x , bs.y) doesn't return a string?

Function object_type:String(bs.x , bs.y)
Return "barrel"
End Function


slenkar(Posted 2008) [#3]
its an array
(sorry forgot to mention)


tonyg(Posted 2008) [#4]
If it is an array you need
If object_type[bs.x , bs.y] = "barrel"



slenkar(Posted 2008) [#5]
thanks that worked!