differences between "normal" lua and dg lua
i would like to create a list of differences between normal lua and demigods lua. so if you find something that doesnt work though it should or the other way around, post it here!
i would like to create a list of differences between normal lua and demigods lua. so if you find something that doesnt work though it should or the other way around, post it here!
I don't know if this is quite what you're looking for, but I think it might be useful.
I found a Lua script for finding global functions at http://www.wowwiki.com/User:Mikk/Scripts. After a few modifications I was able to call it from a Demigod mod and log the results.
Here's the script I used:
And the results are at http://www.arguingwithmyself.com/files/demigod%20cfunctions.txt. Some of the functions listed I've seen in Demigod Lua - like GetArmiesTable in HUD_scoreboard.lua and GetCamera in bman's partyPanel.lua. Unfortunately since I'm new to Lua I haven't found a way to get each function's parameters so I don't know how to actually call them. Maybe an experienced Lua coder can figure that out.
Hope this helps.
once you have a function name, use WinGrep to search for that function in all the LUA and you'll usually find some place where it is being used and/or defined and so can infer the functions. Maybe a LUA expert can give you a better way though ![]()
One good method I found was repr(anyvariable) which will dump the contents of the variable/table/object whatever. I suppose you could pass it a function and see what it dumps out about it?
Demigod lua uses '#' for comment. Normal lua uses this character to get length of a table.
'import' statement is not in normal lua too.
Also, Demigod lua supports the continue statement.
^^^ yeah that's one of the ones I noticed.
Use LUADOC console command to get a list of engine functions.
"import" is not a statement, it's a function.
Basically, the lua core is LuaPlus, so most of the changes:
... and all the other 'improvements' provided by LuaPlus. Though it uses lua 5.0 as a base, so there are couple of annoying bugs.
Also, the lua bytecode isn't compatible with any LuaPlus / vanilla lua versions. ( obviously, gpg modified luaplus )
Demigod uses Lua 5.0 as a base?
I thought it used an earlier version ![]()
Welcome Guest! Please take the time to register with us.