This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
16
Programming Help / Re: How are instances working?
« on: February 16, 2015, 12:17:02 pm »
I made progress too...
I dont have to write all functions, I just have to write many functions that let you give a function. If its possible in the future to use templates then I could let the user add more then one function, but its not. I could do the same as you and add all functions from ENIGMA but I don't have time for that
I dont have to write all functions, I just have to write many functions that let you give a function. If its possible in the future to use templates then I could let the user add more then one function, but its not. I could do the same as you and add all functions from ENIGMA but I don't have time for that

17
Programming Help / Re: How are instances working?
« on: February 16, 2015, 12:01:42 pm »
How can I access in my Code a variable declared for example in the creation code of an specific Instance?
18
Programming Help / How are instances working?
« on: February 16, 2015, 10:28:08 am »
Its me again.
I am asking how instances work in ENGIMA, are they classes, structs or something else?
I am asking how instances work in ENGIMA, are they classes, structs or something else?
19
Function Peer Review / Re: Lua Extension
« on: February 13, 2015, 09:47:00 am »There are now functions to add GML functions into Lua
Here are all functions:
-
20
Programming Help / Re: template in enigma_user
« on: February 13, 2015, 04:25:25 am »
I think I found a way to avoid it.
I could use a struct to get many types like this:
EDIT:
Nope that didn't work
I could use a struct to get many types like this:
Code: [Select]
struct functype{
operator const std::function<int(int)>();
...
...
};
And then I can use the struct functypeEDIT:
Nope that didn't work
21
Programming Help / Re: template in enigma_user
« on: February 13, 2015, 04:07:11 am »
Hm I tested it and the compiler throws this error:
Code: [Select]
In file included from C:/ProgramData/ENIGMA/API_Switchboard.h:42:0,
from SHELLmain.cpp:60:
./Universal_System/Extensions/Lua/include.h:25:9: error: initializing argument 2 of 'variant enigma_user::luaF_execute_file(std::string, void*)' [-fpermissive]
variant luaF_execute_file(string filepath, void* f);
^
In file included from SHELLmain.cpp:109:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In member function 'virtual variant enigma::OBJ_obj_0::myevent_create()':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:42:60: error: invalid conversion from 'void (*)()' to 'void*' [-fpermissive]
luaF_execute_file("C:\\ENIGMA\\Lua\\test.lua", path_end);
^
In file included from C:/ProgramData/ENIGMA/API_Switchboard.h:42:0,
from SHELLmain.cpp:60:
./Universal_System/Extensions/Lua/include.h:25:9: error: initializing argument 2 of 'variant enigma_user::luaF_execute_file(std::string, void*)' [-fpermissive]
variant luaF_execute_file(string filepath, void* f);
^
22
Programming Help / Re: template in enigma_user
« on: February 13, 2015, 03:59:11 am »
Yeah, but I haven't tried your Method, I used this:
Thank you.
Code: [Select]
variant luaF_execute_file_int3(string filepath,const std::function<int(int, int, int)> &f);
I will try it and send it in here.Thank you.
23
Programming Help / Re: template in enigma_user
« on: February 12, 2015, 01:08:12 pm »
Yeah, I know but the problem is that I want to get GML functions that can be executed in Lua like instance_create or motion_set so I cant use void* (As I know)
24
Programming Help / Re: template in enigma_user
« on: February 12, 2015, 08:28:39 am »
FuncType is a Function Pointer.
25
Programming Help / Re: template in enigma_user
« on: February 12, 2015, 06:53:06 am »
So the only way to make this happen is using #define or am I missing something?
EDIT:
Hm... I could write multiple functions to make that happen but that not really good looking
EDIT:
Hm... I could write multiple functions to make that happen but that not really good looking
26
Programming Help / template in enigma_user
« on: February 12, 2015, 05:33:31 am »
I am trying to use a template in the include.h file for my Extension but Enigma or LGM does not recognize my function...
Here is my code:
Here is my code:
Code: [Select]
//include.h
#include "../../var4.h"
#include <functional>
#include <luastate.h>
namespace enigma_user{
template<typename FuncType> variant luaF_execute_file(string filepath,FuncType f);
}
Is there any way to let Enigma or LGM get the function?
27
Function Peer Review / Re: Lua Extension
« on: February 10, 2015, 01:04:35 pm »
For everybody who wants to install the Extension just copy the folders from the repository to your ENIGMA installation and start ENGIMA, for everybody who gets Syntax errors just check if you have enabled the function in the Game Settings under ENIGMA / Extensions
28
General ENIGMA / Re: Will execute_string() be implemented?
« on: February 10, 2015, 01:01:58 pm »
So, I think TheExDeus meant me with the guy who was trying to make a Lua Extension.
The Extension exists and can be downloaded just look in the "Developing Enigma" Forum for "Lua Extension".
I am adding a function to execute GML functions in Lua but it will take a while until this is finished.
Whats finished is to execute Lua files or Strings and let it return a String/Integer so you can use it to debug a bit.
The Extension exists and can be downloaded just look in the "Developing Enigma" Forum for "Lua Extension".
I am adding a function to execute GML functions in Lua but it will take a while until this is finished.
Whats finished is to execute Lua files or Strings and let it return a String/Integer so you can use it to debug a bit.
29
Function Peer Review / Re: Lua Extension
« on: February 09, 2015, 08:03:54 am »
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
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

30
Function Peer Review / Lua Extension
« on: February 08, 2015, 10:54:50 am »
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:
Here is the link to the repository of the Lua Extension: https://github.com/WizzardMaker/Lua-Extension
PS: I've written it so that it works, but I'll still have to clean it...
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:
Code: [Select]
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-Extension
PS: I've written it so that it works, but I'll still have to clean it...