WizzardMaker
|
 |
Posted on: February 08, 2015, 10:54:50 am |
|
|
 Joined: Feb 2015
Posts: 35
|
Hello folks! I used my free Weekend to create a Lua Extension for ENIGMA and it worked! The extension is not finished, the only thing what it can do is open a Lua script and let it search for a variable called "returner" and it can execute a string filled with Lua code. I will add functions to execute Lua scripts and let it return your variables and I try to add a function that will let Lua execute some GM functions. Here are the functions that can be executed, what they do and what they need: lua_execute_file(filename) --filename = Thats the name + path to the Lua script --What the function needs: It needs a lua script with a variable called "returner". --What the function returns: It returns the variable "returner" from the Lua script, if the function cant find the variable "returner" or its not a string/integer the function will return "ERROR! UNKNOW RETURNER TYPE OR ERROR IN SCRIPT" lua_execute_string(code) --code = What do you think? --What the function does: For now it does nothing... but I am trying to let the function do the same as lua_execute_file() Here is the link to the repository of the Lua Extension: https://github.com/WizzardMaker/Lua-ExtensionPS: I've written it so that it works, but I'll still have to clean it...
|
|
« Last Edit: February 09, 2015, 06:12:17 am by WizzardMaker »
|
Logged
|
|
|
|
|
WizzardMaker
|
 |
Reply #2 Posted on: February 09, 2015, 08:03:54 am |
|
|
 Joined: Feb 2015
Posts: 35
|
So the link is up. I decided to use Lua because I know it, I know the syntax and I know how it works. I dont really know about other scripting languages and I didnt wanted to read a whole documentation about a new language so I used Lua. You can make your own extension with another language 
|
|
|
Logged
|
|
|
|
|
|
WizzardMaker
|
 |
Reply #5 Posted on: March 01, 2015, 01:58:49 pm |
|
|
 Joined: Feb 2015
Posts: 35
|
The Lua Extension is "finished" (The code needs some cleanup  ) and ready to be used. Just download from GitHub and follow my instructions on how to install it. GitHub page: https://github.com/WizzardMaker/Lua-ExtensionThere are still some unknown warning messages from the Compiler which I have to fix but its ready to use! I had to disable some functions, namely: All of the extension functions (There will be support for it later but not for now) and all of the functions with varargs as argument (Just look into the LGM function list in the build tab on the top) and some of the buffer functions other functions: is_real();is_string();instance_change_inst();abs();min();max();median();
|
|
|
Logged
|
|
|
|
|
HitCoder
|
 |
Reply #7 Posted on: May 02, 2015, 07:40:17 am |
|
|
 Location: Oxford, England Joined: Aug 2014
Posts: 157
|
I'll look at it when you post the link. I'm still deciding on what scripting language I want to implement. I ain't big fan of Lua, but maybe it will suffice.
Actually, Lua is a really nice language, the only issue is it's simplism. As a matter of fact though, it's a really damn easy language to learn when it comes to code, so maybe if this is finished we can have games with easy modding support using a Lua interpreter... Actually, the guide on making an extension in the wiki teaches with Lua, but I could never get that working... PLEASE keep up the work, you've got me really excited! ^^
|
|
|
Logged
|
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician. DISCORD: HitCoder#4530
|
|
|
|
|
|
|
|
sorlok_reaves
|
 |
Reply #13 Posted on: May 03, 2015, 10:07:53 pm |
|
|
 Joined: Dec 2013
Posts: 260
|
I pushed a patch to fix one of the problems with LGM, but it's not really my area of expertise. If a particular crash scenario is causing you untold grief, try to narrow down the cause and I'll see what I can do to help. 
|
|
|
Logged
|
|
|
|
|
|