MaxLua Args

BlitzMax Forums/BlitzMax Programming/MaxLua Args

Sanctus(Posted 2010) [#1]
Hey guys.
I'm trying to get used to some scripting around here.
Anyway I want to call a method named Invoke that takes the first paramter as a string(name of the function to invoke) and the the second as an array of objects(arguments).

Now I'm not sure how to make this work

Local args:Int[] = New Int[2]
args[0] = v.x
args[1] = v.y
script.Invoke("OnMapClick", args)


Apparently I can't convert a int array to a object array although all types are supposed to be objects.
Can anyone help me?


Zeke(Posted 2010) [#2]
script.Invoke("OnMapClick",[String(v.x),String(v.y)]