• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Strange error?

C

CinoComeback

Guest
Hey, GameMaker Community.
Since I installed the new update (GM Studio 1.4), I unfortunately can't start the game anymore.
Here's a screenshot... I really don't understand, why it doesn't work anymore.

Sorry for my bad English skills, I'm German. ^^

Thank ya :) GameMakerStrangeError.PNG
 
O

orSQUADstra

Guest
I see you're commenting your stuff in german, can you confirm you don't have any special german characters in your object name that might cause the problem?
 
C

CinoComeback

Guest
I see you're commenting your stuff in german, can you confirm you don't have any special german characters in your object name that might cause the problem?
I've //-things, I'll delete the german things. One moment pls
 
C

CinoComeback

Guest
The error says, that the problem ist ''var origin_x;''... :(
 
J

jackhigh24

Guest
look at your code you only set it as a var if the view is not enabled
 
C

CinoComeback

Guest
No, that has to be there. Without it, it doesn't work
 

PlayerOne

Member
Your code looks fine. Everything is declared and yet I can't help but notice the initialized variables at the top aren't colored differently. Not sure if that is a GMS2 only feature.

Try writing it like this:
Code:
var origin_x = sprite_get_xoffset(sprite_index);
var origin_y = sprite_get_yoffset(sprite_index);
Also check to make sure both the JOHN instance is in the room with the current view not enabled to rule out the problem.
 
J

jackhigh24

Guest
in your last code you posted you showed that you only initialize your vars origin_x and origin_y within that not view enabled statement, then further down you are calling origin_x from outside of that not view enabled, you cant do that because if view is enabled before its not enabled then you get that error
 
Last edited by a moderator:
Top