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.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 »
451
Issues Help Desk / Re: Are constants accessible from Drag and Drop actions?
« on: May 05, 2014, 10:18:50 am »As far as I know, ENIGMA doesn't seem to support making constants, yet. I tried some methods, but the only one that worked was "global.variable = value".
And yeah, that space _ thing I said before deleting my post (lol).
It is possible to use constants, but it's very tricky to find how to do it !
Constants can be declared with an enumeration. For example :Code: [Select]
enum { RIGHT, LEFT, DOWN, UP };But the problem is that if you declare an enum in a script or in an object, you get an error message (c.f : http://enigma-dev.org/forums/index.php?topic=1917.0). But if you go to ENIGMA settings, and you go to the 'Definitions' section, and you put the enum there, it works ! The only problem is that ENIGMA settings are global for every project, so be careful to update these settings if you load another project or you make a new project, because by default these settings will not change.
452
General ENIGMA / Re: Inheritance Fixes
« on: May 05, 2014, 07:26:32 am »
Robert, I did more tests concerning inheritance, and so far all features seem to work correctly.
453
Issues Help Desk / Re: Problems with global variables
« on: May 02, 2014, 05:54:20 am »
Finally, i managed to use global variables in script. But it seems there is only one way to do it : with the dot notation. In the script, i can use :
In this case, it works. I don't have any error message, and i can display the value in the object. We should at least update the global section in the wiki : http://enigma-dev.org/docs/Wiki/Global, so other people will not spend hours trying to figure out why global variables don't seem to work.
For the wiki, i could do it but the problem is that my english is far from being fluent. 
Code: [Select]
global.gamestate = 1;In this case, it works. I don't have any error message, and i can display the value in the object. We should at least update the global section in the wiki : http://enigma-dev.org/docs/Wiki/Global, so other people will not spend hours trying to figure out why global variables don't seem to work.
For the wiki, i could do it but the problem is that my english is far from being fluent. 
454
Issues Help Desk / Re: Problems with global variables
« on: May 01, 2014, 02:46:10 pm »ego, what I fixed was calling event_inherited() inside alarms, user defined events and other stacked events, I never touched anything with globals or variable declaration, that is a different part of the compiler.
Eh, i was not accusing anyone Robert!
Just trying to understand what's going on. This means probably that it was never possible to declare global variables in scripts.
455
Off-Topic / Re: The choice was obvious, and it wasn't Enigma
« on: May 01, 2014, 01:58:30 pm »
A person who is ranting about people who are ranting, how original !
456
Issues Help Desk / Re: Problems with global variables
« on: May 01, 2014, 01:55:50 pm »Can you try to use an updated version of ENIGMA? I am using the latest on Windows and this is working.
Obj_0 createCode: [Select]globalvar hello;
hello = 999;
Obj_1 stepCode: [Select]show_message(string(hello));
It shows 999 correctly for me.
I am using the latest version of ENIGMA on Windows and your example is working. But your example is slightly different from mine : you declare the variable in a object, and i declare it in a script. If you test my example, you would see it that you would have the error too (I tested on two different pcs, with two different OS : Windows 7 and Windows 8.1). But anyway thanks for your help. But now my question is : wouldn't it be possible to declare a global variable in a script ?
457
Issues Help Desk / Re: Problems with global variables
« on: May 01, 2014, 11:17:43 am »I believe you should change "global var game_state;" to "globalvar game_state;", then it should work.
GML is weird, eh?
Thanks for the help, but the result is the same.
458
Issues Help Desk / Problems with global variables
« on: May 01, 2014, 07:24:10 am »
As Robert said he has almost finished objects inheritance, i wanted to test my project and see if i can run it. I've still problems with global variables. In a script, i've the following code:
In another object, in the normal step, i want to see if i have access to this variable:
I've the following error message:
In the creation code of the room, i call the script with the global variables declaration. But anyway it doesn't change anything, and also it doesn't change anything if the object is used or not ! (Right now it is not used). If i remove the line :
I don't have anymore the error message. Do you know why i've this problem ? Any help is welcome.
You can download my 'test' project here : https://dl.dropboxusercontent.com/u/29802501/test.egm
Code: [Select]
global var game_state;
game_state = 1;In another object, in the normal step, i want to see if i have access to this variable:
Code: [Select]
show_message(string(game_state));I've the following error message:
Quote
In file included from SHELLmain.cpp:105:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectaccess.h: In function 'var& enigma::varaccess_game_state(int)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectaccess.h:57:46: error: 'struct enigma::OBJ_obj_0' has no member named 'game_state'
case obj_0: return ((OBJ_obj_0*)inst)->game_state;
^
In the creation code of the room, i call the script with the global variables declaration. But anyway it doesn't change anything, and also it doesn't change anything if the object is used or not ! (Right now it is not used). If i remove the line :
Code: [Select]
game_state = 1I don't have anymore the error message. Do you know why i've this problem ? Any help is welcome.
You can download my 'test' project here : https://dl.dropboxusercontent.com/u/29802501/test.egm
459
General ENIGMA / Re: LateralGM 1.8.5
« on: May 01, 2014, 03:48:12 am »
Ok, i think i've found finally the culprit. I tried to see if it was an hardware problem instead and i opened my pc. This is what i found !
:

Who said the life of programmers is boring ?
:
Who said the life of programmers is boring ?
460
General ENIGMA / Re: LateralGM 1.8.5
« on: May 01, 2014, 03:35:37 am »Guys, try to make a reproducible test case, because I can confirm that running an unsaved project is working fine here. Until you can give me exact steps I can't even prove what you're saying, let alone fix it.
This is hard Robert. Sometimes i can reproduce this bug, and then i don't

I tried to make again a test case, and i had the same problems. Then i saw that i was always making new test projects with the same file name ('test'), so i was overwriting always the previous project. So i tried to remove all files (egm + gb1) files and restart a new project but then i didn't have anymore this problem. But now if i make a new project and overwrite again the older project, i don't have anymore this problem. So in the end, i don't know.
461
General ENIGMA / Re: LateralGM 1.8.5
« on: May 01, 2014, 02:56:35 am »Does it happen on games you import from GMS
or even with games you create from scratch and save to EGM as well ?
Ok, i did some tests. First, i made a project from scratch. When i made some modifications, ENIGMA takes in account the latest version. I save the project in egm format, and doing some modifications again, and still everything is fine. Then i restart ENIGMA and load again the project, and this time, the problem i was talking about occurs.
462
General ENIGMA / Re: LateralGM 1.8.5
« on: May 01, 2014, 12:01:49 am »repro steps:
1) open engima
2) make something (don't save)
3) try to run
expected result:
stuff you just made in the game
actual result:
empty game
workaround:
save the project between 2) and 3)
Exactly. That's what i was talking about. Some of the bugs i reported here recently were not really bugs, but it was just that after some modifications i didn't save the project first. You want to test a project, but ENIGMA doesn't run with the version you see on the screen.
463
Programming Help / Enumerations are not working
« on: April 30, 2014, 07:01:16 am »
I tried to declare enumerations, and so far i've only error messages. For example, if i take the example found in the wiki (c.f http://enigma-dev.org/docs/Wiki/ENIGMA:Specification):
I've the following error message :
I didn't have this problem last year. This seems to be new.
Code: [Select]
enum {
a,
b,
c,
d = 10,
e,
f
}I've the following error message :
Quote
Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:41:3: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: At global scope:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:44:3: error: expected unqualified-id before 'return'
return 0;
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:45:1: error: expected declaration before '}' token
}
^
In file included from SHELLmain.cpp:102:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function 'variant _SCR_scr_0(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:35:5: error: new types may not be defined in a return type
enum
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:35:5: note: (perhaps a semicolon is missing after the definition of '_SCR_scr_0(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)::<anonymous enum>')
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:37:36: error: invalid use of qualified-name '::varaccess_a'
enigma::varaccess_a(int(self)), enigma::varaccess_b(int(self)), enigma::varaccess_c(int(self)), enigma::varaccess_d(int(self))= 10, enigma::varaccess_e(int(self)), enigma::varaccess_f(int(self));
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:35:5: error: new types may not be defined in a return type
enum
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:35:5: note: (perhaps a semicolon is missing after the definition of '_SCR_scr_0(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)::<anonymous enum>')
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:37:68: error: invalid use of qualified-name 'enigma::varaccess_b'
enigma::varaccess_a(int(self)), enigma::varaccess_b(int(self)), enigma::varaccess_c(int(self)), enigma::varaccess_d(int(self))= 10, enigma::varaccess_e(int(self)), enigma::varaccess_f(int(self));
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:35:5: error: new types may not be defined in a return type
enum
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:35:5: note: (perhaps a semicolon is missing after the definition of '_SCR_scr_0(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)::<anonymous enum>')
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:37:100: error: invalid use of qualified-name 'enigma::varaccess_c'
enigma::varaccess_a(int(self)), enigma::varaccess_b(int(self)), enigma::varaccess_c(int(self)), enigma::varaccess_d(int(self))= 10, enigma::varaccess_e(int(self)), enigma::varaccess_f(int(self));
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:35:5: error: new types may not be defined in a return type
enum
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:35:5: note: (perhaps a semicolon is missing after the definition of '_SCR_scr_0(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)::<anonymous enum>')
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:37:132: error: invalid use of qualified-name 'enigma::varaccess_d'
enigma::varaccess_a(int(self)), enigma::varaccess_b(int(self)), enigma::varaccess_c(int(self)), enigma::varaccess_d(int(self))= 10, enigma::varaccess_e(int(self)), enigma::varaccess_f(int(self));
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:37:137: error: invalid pure specifier (only '= 0' is allowed) before ',' token
enigma::varaccess_a(int(self)), enigma::varaccess_b(int(self)), enigma::varaccess_c(int(self)), enigma::varaccess_d(int(self))= 10, enigma::varaccess_e(int(self)), enigma::varaccess_f(int(self));
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:41:3: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: At global scope:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:44:3: error: expected unqualified-id before 'return'
return 0;
^
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:45:1: error: expected declaration before '}' token
}
^
I didn't have this problem last year. This seems to be new.
464
Programming Help / Re: How to declare variables in ENIGMA?
« on: April 30, 2014, 06:56:37 am »
Darkstar2, TheExdeus:
Thanks for you help.
Thanks for you help.
465
General ENIGMA / Re: LateralGM 1.8.5
« on: April 30, 2014, 06:04:47 am »
If you make some modifications, for instance you rename a resource, ENIGMA doesn't take in account if you don't save the project first. Is this normal ?