Lua trouble

BlitzMax Forums/BlitzMax Programming/Lua trouble

Diordna(Posted 2006) [#1]
I can't get the Lua module to work. Synced with the Axe server, built all Axe modules, relaunched the IDE, followed Noel's tutorial (again, because it's been a while) and I get "Identifier 'luaL_newstate()' not found." on "Local lua_State:Byte Ptr = luaL_newstate( )".


taxlerendiosk(Posted 2006) [#2]
A change was made a while ago that only BRL/PUB modules are imported by default, make sure you're explicitly "Import"ing the module at the top of your code.


taxlerendiosk(Posted 2006) [#3]
Also, I just noticed this bit in the tutorial: "Strings in Lua are your standard null-terminated C strings." This might've been true at the time (actually, probably not) but, internally to Lua, strings are NOT null-terminated and can contain null characters that don't end the string (like in Blitz). It's confusing because there's a Lua API function that imports a Lua string *from* a given null-terminated C string, but there should also be one that can take a pointer and a "length" integer and can take any string at all.


Diordna(Posted 2006) [#4]
Thanks, I'd forgotten that I had to import it. *slaps self*