Jump to content

Lua map load callback


Rick
 Share

Recommended Posts

I get an error in Lua with the following definition saying error in function 'Load'. I'm assuming the callback method doesn't work for Lua? In the docs it talks about 'hookname' as one of the argumnets but this doesn't seem to work. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/map/mapload-r510

 

if Map:Load(mapfile, "ForEachEntity", self) == false then return false end

Link to comment
Share on other sites

  • 1 month later...

My implementation here is actually rather ****. I think the proper way to do this should be to pass in a Lua object for the function and a Lua table for the object. However, the documentation is correct; It says a Leadwerks Object is the parameter to pass in, and self is a Lua table.

 

Fortunately, I can add an overload in the future and leave this one for backwards compatibility.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...