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
1
Issues Help Desk / Function essentially asking for 1.5 arguments?
« on: September 27, 2016, 12:46:52 pm »
So here's the code in question:
And if I compile that, I get the error:
It's
Now, not only am I 100% sure ord() should take one (and only one) argument, but if I add an additional argument to the function:
I'm using the latest version off of Github, and I'm quite confused and frustrated. A little help?
Code: [Select]
image_speed = 0.1;
moveSpeed = 3;
weapon = "pistol";
facing = "down";
key_moveUp = keyboard_check(ord('W'));
key_moveDown = keyboard_check(ord('S'));
key_moveLeft = keyboard_check(ord('A'));
key_moveRight = keyboard_check(ord('D'));
key_shootUp = keyboard_check(ord('I'));
key_shootDown = keyboard_check(ord('K'));
key_shootLeft = keyboard_check(ord('J'));
key_shootRight = keyboard_check(ord('L'));
And if I compile that, I get the error:
Code: [Select]
Check `obj_player::create...Syntax error in object `obj_player', Create event:0:
Line 7, position 36 (absolute 114): Too few arguments to function `ord': provided 1, required 2.
It's
Now, not only am I 100% sure ord() should take one (and only one) argument, but if I add an additional argument to the function:
Code: [Select]
In file included from SHELLmain.cpp:109:0:
/home/taco/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In member function ‘virtual variant enigma::OBJ_obj_player::myevent_create()’:
/home/taco/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:46:45: error: too many arguments to function ‘int enigma_user::ord(std::__cxx11::string)’
key_moveUp = keyboard_check(ord("W", "W"));
^
I'm using the latest version off of Github, and I'm quite confused and frustrated. A little help?
2
Programming Help / Re: Unknown function or script `string_copy'?
« on: July 13, 2016, 06:16:56 pm »
Works like a charm! Thank you very much.
3
Programming Help / Re: Unknown function or script `string_copy'?
« on: July 12, 2016, 10:09:48 pm »
I have a sneaking suspicion that this is happening because I'm using it in a switch case...
Here's the code in question:
Here's the code in question:
Code: [Select]
//gj_checkstatus()
//Returns: true if the function is completed, false if there is an GameJolt error, <0 if there is a GameMaker error (for example, if GM couldn't find the site).
//If returns 0, more info will be available when you call gj_error()
//Returns the status and makes the info available, so ALWAYS call this before you request any info.
var httpstatus=ds_map_find_value(async_load,"status");
if(httpstatus<0)
{
return httpstatus;
}
else
{
var datatype=ds_map_find_value(gj_handletypemap,ds_map_find_value(async_load,"id"));
if(datatype==4) //dump format
{
var gj_returnstring=ds_map_find_value(async_load,"result");
ds_map_delete(gj_handletypemap,ds_map_find_value(async_load,"id"))
switch(string_copy(gj_returnstring,1,7))
{
case "SUCCESS":
gj_returnstring=string_delete(gj_returnstring,1,9)
ds_map_clear(gj_infomap)
ds_map_add(gj_infomap,"0data",gj_returnstring)
return true;
break;
case "FAILURE":
gj_returnstring=string_delete(gj_returnstring,1,9)
ds_map_clear(gj_infomap)
ds_map_add(gj_infomap,"error",gj_returnstring)
return false;
break;
}
}
else
{
//Make a ds_map with the information
//First clear our info map
ds_map_clear(gj_infomap)
var gj_key="",gj_value="",gj_returnstring=ds_map_find_value(async_load,"result");
//Now removed because of HTML5
//gj_returnstring=string_replace_all(gj_returnstring,"","") //make it easier to read the map by removing all newlines.
//show_message(gj_returnstring) //Debugging
gj_returnstring=string_replace_all(gj_returnstring,'\"',"''") //Sorry, couldn't find a better way to do this.
//First always check the first line, as this always contains the status
gj_key=string_copy(gj_returnstring,1,string_pos(':"',gj_returnstring)-1)
gj_returnstring=string_delete(gj_returnstring,1,string_pos(':"',gj_returnstring)+1)
gj_value=string_copy(gj_returnstring,1,string_pos('"',gj_returnstring)-1)
gj_returnstring=string_delete(gj_returnstring,1,string_pos('"',gj_returnstring)+2)
if(gj_value="true")
{
//Succes! Now we can read the rest of the map, if the call needs it, else just return true.
switch(datatype)
{
case 0:
gj_user=gj_tempuser
gj_token=gj_temptoken
gj_tempuser=""
gj_temptoken=""
break;
case 1:
var gj_currnum=0;
while(gj_returnstring!="")
{
gj_key=string_copy(gj_returnstring,1,string_pos(':"',gj_returnstring)-1)
gj_returnstring=string_delete(gj_returnstring,1,string_pos(':"',gj_returnstring)+1)
gj_value=string_copy(gj_returnstring,1,string_pos('"',gj_returnstring)-1)
gj_returnstring=string_delete(gj_returnstring,1,string_pos('"',gj_returnstring)+2)
if(ds_map_exists(gj_infomap,string(gj_currnum)+gj_key))
{
gj_currnum+=1
}
ds_map_add(gj_infomap,string(gj_currnum)+gj_key,gj_value)
}
ds_map_add(gj_infomap,"fieldnum",gj_currnum)
break;
//Case 3 is the same as 1, but then for highscores with guests. We add the is_guest var here.
case 3:
var gj_currnum=0;
while(gj_returnstring!="")
{
gj_key=string_copy(gj_returnstring,1,string_pos(':"',gj_returnstring)-1)
gj_returnstring=string_delete(gj_returnstring,1,string_pos(':"',gj_returnstring)+1)
gj_value=string_copy(gj_returnstring,1,string_pos('"',gj_returnstring)-1)
gj_returnstring=string_delete(gj_returnstring,1,string_pos('"',gj_returnstring)+2)
//show_message(gj_returnstring) //Debugging
if(ds_map_exists(gj_infomap,string(gj_currnum)+gj_key))
{
gj_currnum+=1
}
if(gj_key=="user")
{
if(gj_value=="")
ds_map_add(gj_infomap,string(gj_currnum)+"is_guest",1)
else
{
ds_map_add(gj_infomap,string(gj_currnum)+"is_guest",0)
ds_map_add(gj_infomap,string(gj_currnum)+"display_name",gj_value)
}
}
if(gj_key="guest")and(gj_value!="")
{
ds_map_add(gj_infomap,string(gj_currnum)+"display_name",gj_value)
}
ds_map_add(gj_infomap,string(gj_currnum)+gj_key,gj_value)
}
ds_map_add(gj_infomap,"fieldnum",gj_currnum)
break;
}
//Then remove the handle id from the map, as it is no longer needed.
ds_map_delete(gj_handletypemap,ds_map_find_value(async_load,"id"))
return true;
}
else
{
//The error is on the next line now
gj_key=string_copy(gj_returnstring,1,string_pos(':"',gj_returnstring)-1)
gj_returnstring=string_delete(gj_returnstring,1,string_pos(':"',gj_returnstring)+1)
gj_value=string_copy(gj_returnstring,1,string_pos('"',gj_returnstring)-1)
gj_returnstring=string_delete(gj_returnstring,1,string_pos('"',gj_returnstring)+2)
//Add it to our ds_map so we can find it later if gj_error is called
ds_map_add(gj_infomap,"error",gj_value)
return false;
}
}
}
4
Programming Help / Unknown function or script `string_copy'?
« on: July 12, 2016, 09:50:14 pm »
So when I try to compile my lil game, which makes use of the "string_copy" function, it tells me " Unknown function or script `string_copy' "
Is this function not implemented in ENIGMA, and if not, is there any alternative I could use to trim strings?
Is this function not implemented in ENIGMA, and if not, is there any alternative I could use to trim strings?
5
Issues Help Desk / Re: LateralGM hangs in file chooser dialouge
« on: December 13, 2015, 06:58:03 pm »
Thank you very much! I switched over to the Oracle JDK and it seems to be working fine. I'd assume these bugs should probably be directed to the OpenJDK devs, then.
Anyways, thank you for the help.
Anyways, thank you for the help.
6
Issues Help Desk / LateralGM hangs in file chooser dialouge
« on: December 12, 2015, 10:22:38 pm »
(On (X)ubuntu 15.10)
I'm using an extremely recent (a la 3 days ago) build of Enigma/LateralGM, and it runs perfectly except for the fact that whenever I try to open a file (project file, sprite, sound, etc.) the file chooser/whole GUI freezes after one or two clicks. The process doesn't start taking an absurdly high amount of CPU/RAM or anything, it just kind of gives up and I have to kill the process. It doesn't even throw any errors. :/
I've tried apt-get purging java and reinstalling, but it didn't help.
java -version:
I really wish I could be of more help, but I'm not really getting a lot of information to work with here...
I'm using an extremely recent (a la 3 days ago) build of Enigma/LateralGM, and it runs perfectly except for the fact that whenever I try to open a file (project file, sprite, sound, etc.) the file chooser/whole GUI freezes after one or two clicks. The process doesn't start taking an absurdly high amount of CPU/RAM or anything, it just kind of gives up and I have to kill the process. It doesn't even throw any errors. :/
I've tried apt-get purging java and reinstalling, but it didn't help.
java -version:
Code: [Select]
openjdk version "1.8.0_66-internal"
OpenJDK Runtime Environment (build 1.8.0_66-internal-b17)
OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode)
I really wish I could be of more help, but I'm not really getting a lot of information to work with here...
7
Programming Help / Re: Room Persistance?
« on: June 16, 2015, 09:56:54 pm »
Yeah, I guess I could use that. It'll just take me a bit longer to port over my games.
8
Programming Help / Room Persistance?
« on: June 15, 2015, 09:09:36 pm »
Excuse me if this has been asked before, I used the search bar to the best of my abilities.
I've been trying to bring some of my old GM games into Enigma, and I've noticed that persistent rooms don't seem to be working at all. Everything just resets after leaving and re-entering. I used to use it for transitioning maps, but I'm not quite sure how to make sure everything stays the same upon re-entry.
I've been trying to bring some of my old GM games into Enigma, and I've noticed that persistent rooms don't seem to be working at all. Everything just resets after leaving and re-entering. I used to use it for transitioning maps, but I'm not quite sure how to make sure everything stays the same upon re-entry.

9
Issues Help Desk / Re: Crashing Ubuntu 14.10
« on: March 05, 2015, 10:59:02 pm »
I think this is definitely a Java bug. I've been noticing Minecraft seems to crash my system the same way whenever I scroll with the mousewheel in menus instead of clicking and dragging the bar.
Maybe it's just my system. I hope not. That'd take years to fix...
Maybe it's just my system. I hope not. That'd take years to fix...
10
Issues Help Desk / Re: Crashing Ubuntu 14.10
« on: March 01, 2015, 07:40:42 pm »
There doesn't appear to be any log file in LGM's directory... 
I uploaded the system crash log here. There was about 20 MB of random garbage at the end of the file. I didn't think it was important so I didn't include it. (It probably would have broken pastebin, too.)

I uploaded the system crash log here. There was about 20 MB of random garbage at the end of the file. I didn't think it was important so I didn't include it. (It probably would have broken pastebin, too.)
11
Issues Help Desk / Re: Crashing Ubuntu 14.10
« on: March 01, 2015, 04:00:38 pm »
If I copy lateralgm.jar to another location and run it, the problem seems to go away.
After it crashes, my screen goes black for about 5 seconds, then it turns back on and I'm at the login screen. Once I log back in, all my programs are closed and my volume and brightness are back up to the maximum, as if I rebooted my machine.
None of my keyboard lights flash, and during the brief black screen, I can't switch th TTY1-6.
After it crashes, my screen goes black for about 5 seconds, then it turns back on and I'm at the login screen. Once I log back in, all my programs are closed and my volume and brightness are back up to the maximum, as if I rebooted my machine.
None of my keyboard lights flash, and during the brief black screen, I can't switch th TTY1-6.
12
Issues Help Desk / Re: Crashing Ubuntu 14.10
« on: February 25, 2015, 12:51:41 am »
Now I'm even more confused...
This is what I'm talking about:
This is what I'm talking about:

13
Issues Help Desk / Re: Crashing Ubuntu 14.10
« on: February 24, 2015, 10:05:58 pm »
Alright. After messing around I can say for sure that these steps cause my system to crash:
1) Open an object
2) Click modify and open up the event selector
3) Close the event selector
4) Click modify again
5) Computer explodes in a plume of smoke and flames
If I close the object window and open it up again, I can use modify without incident.
1) Open an object
2) Click modify and open up the event selector
3) Close the event selector
4) Click modify again
5) Computer explodes in a plume of smoke and flames
If I close the object window and open it up again, I can use modify without incident.
14
Issues Help Desk / Re: Crashing Ubuntu 14.10
« on: February 23, 2015, 01:39:01 am »
I'm using OpenJRE/JDK. Here's the results of a java -version, in case that helps:
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~utopic1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
I'll try to find consistent steps, but it seems pretty random so far...
java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~utopic1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
I'll try to find consistent steps, but it seems pretty random so far...

15
Issues Help Desk / Crashing Ubuntu 14.10
« on: February 20, 2015, 09:09:18 pm »
About 20% of the time, when I click "modify" in an object's menu, in order to add a new event, my entire system crashes and closes everything I have open without saving my work. Any help fixing this?
Pages: 1