• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Constant name @@SleepMargin is not valid. ?

J

JeZxLee

Guest
Hi,

Dusted off my GameMaker:Studio 1 and am trying to get an update to my game running on Android device.
When I run the game on Android device I see white Android splash screen followed by two error messages:
"Constant name @@SleepMargin is not valid."
"Failed to define the constants."

Any idea on how to solve above errors on real Android device?
Running GameMaker:Studio 1.99.525 Early Access...
Thanks!

JeZxLee
 

rIKmAN

Member
Hi,

Dusted off my GameMaker:Studio 1 and am trying to get an update to my game running on Android device.
When I run the game on Android device I see white Android splash screen followed by two error messages:
"Constant name @@SleepMargin is not valid."
"Failed to define the constants."

Any idea on how to solve above errors on real Android device?
Running GameMaker:Studio 1.99.525 Early Access...
Thanks!

JeZxLee
Can you compile an empty room project to your device?
What is the value of Sleep Margin in your Global Game Settings?
 
J

JeZxLee

Guest
Negative on the empty room project, same two errors...
I booted up stable version 1.4.1763 and the APK built on that version runs on my Android device.

Any ideas?

JeZxLee
 

rIKmAN

Member
I can compile to Android fine using EA 1.99.525, so there is nothing inherently wrong with that version.

Try uninstalling and reinstalling as sleep margin is a setting in the IDE so maybe something got corrupted on the install?
Do you have antivirus or system protection sofware that might have removed files or blocked access to folders when installing?
Are you using the correct version of the SDK / NDK etc for the EA in the settings? I think it's 12b you want.

Just throwing ideas out...
 
J

JeZxLee

Guest
Hi,

Not sure what the issue is with the Early Access version on my desktop.
I know for a fact that the previous Early Access DID work though.
(the game version on Google Play was from previous Early Access)

I will finish much needed update using current Stable version.
I don't think I will be buying GM:S 2 - there are numerous free game engines available.
Kind of pissed at YoYo Games, paid $800+ for GM:S and now they dropped support for it.
Will squeeze out one more final version and then drop GM:S dev permanently.

JeZxLee
 
K

Kajote

Guest
I have the same problem...
What is the solution?
I need EA for it spine support.

Your practice toward us is definitely awful.
I was really upset when you announced that my 800$ software gets obsolete, and you drop the support for it.
I don't think I'll buy any of your newer products.

Edit : I can compile an empty room project correctly (I am using the 1.99.549 version btw), but my project won't run (@@sleepmargin not valid)
My sleepmargin value is set to 4 (global game settings) in both new one-room project, and the actual, real one.
 
Last edited by a moderator:

rIKmAN

Member
I have the same problem...
What is the solution?
I need EA for it spine support.

Your practice toward us is definitely awful.
I was really upset when you announced that my 800$ software gets obsolete, and you drop the support for it.
I don't think I'll buy any of your newer products.

Edit : I can compile an empty room project correctly (I am using the 1.99.549 version btw), but my project won't run (@@sleepmargin not valid)
My sleepmargin value is set to 4 (global game settings) in both new one-room project, and the actual, real one.
I'm not a fan of the Spine support either (far from it in fact) but to be fair 1.4 isn't obsolete and hasn't had support dropped.....yet - as shown by the fact you are using an EA version which has had features, fixes and updates added to it since GMS2 came out.

1) Try clearing the compiler cache and rebuilding.
2) Try using File > Save As to save it as a new project and try building.
3) Try creating a new project and importing everything from your original project into it, then building.

See how that goes and report back, it seems something in your project is causing the error if the empty room project works fine.
 
K

Kajote

Guest
1 and 2 not working.
Can you help me understand what can possibly cause that problem? (I have no idea what sleepmargin actually is).
Creating a new project and importing everything sounds like a lot of work !
And I'm not sure why should it help, what in the project can cause that problem all of a sudden.
Everything works on stable version (although I need to use the EA because the project containing my spine sprites won't compile on stable. I am using, and still want to use 3.4.02 spine version)
 

rIKmAN

Member
1 and 2 not working.
Can you help me understand what can possibly cause that problem? (I have no idea what sleepmargin actually is).
I've no idea what caused the problem, which is why I'm offering you a few different things to do to try and fix it - if an empty room project works fine then there is obviously something in your project which is corrupting / breaking during compile.
Creating a new project and importing everything sounds like a lot of work !
And I'm not sure why should it help, what in the project can cause that problem all of a sudden.
If creating a new project and importing the resources from your existing project sounds like too much work, then I don't know what to say other than you can't be too bothered about trying to find a way to fix the problem. It will take you 5mins, if that.

Check the forum, doing exactly this has fixed many problems before, just like rebooting a PC can often fix weird problems for seemingly no reason.
If you don't want to try it then fine, get in touch with helpdesk and see if they can help.
Everything works on stable version (although I need to use the EA because the project containing my spine sprites won't compile on stable.
So, everything doesn't work work on stable version then, does it?
Which again points to the issue being somewhere in your project - which is why I suggested importing the resources from it into a fresh project.

Import everything at once and see if that works.

If not, try it again but only import the basics you would need to run/compile, then add things in one by one and keep re-compiling and testing to help narrow down whether you might have a corrupt object, a corrupt room, a corrupt script etc etc.

It's just advice / suggestions, try it or don't try it, your only other option is to get in touch with helpdesk and hopefully they can help out.
 
K

Kajote

Guest
Thank you :)
rIKmAN
I have news - the project we're talking about is located on dropbox, my friend can compile it with no problems on android.
However I can't !
I'm stuck! have no Idea what to do... something is bugged as hell.
I've tried different versions of jdk and ndk

That's my current setting.
 

rIKmAN

Member
Thank you :)
rIKmAN
I have news - the project we're talking about is located on dropbox, my friend can compile it with no problems on android.
However I can't !
Try copying it from Dropbox to your local drive, clearing the compiler cache and building again.
Have you tried matching the settings your friend is using: the same GMS version, JDK, NDK and Android SDK settings?

Failing that I would uninstall GMS, reboot, run a registry clean with something like CCleaner, reboot and then try re-installing GMS.

Either follow the official setup guide or have a read through this thread: https://forum.yoyogames.com/index.p...-gms-version-1-4-1763-as-of-may-1-2017.16061/
 
K

Kajote

Guest
Reinstalling all the stuff is so much time at work consuming, that I just waited, because everything was pointing that the problem is occuring only in the current early acces version.
Now i downloaded the new early acces ver. and everything works fine.
 

klys

Member
Im having the same issue with 1.4.177, my solution was to try with the EA 1.9.548 which dont give this error about constants not being able to be defined.
 
G

GrandFree

Guest
Is anyone else having this issue on the stable version?

So incredibly confused and not sure how to fix it without switching over to EA.
 
Top