Jump to content


Photo

Game Maker Project File Problem


  • Please log in to reply
3 replies to this topic

#1 Rhutos

Rhutos

    GMC Member

  • GMC Member
  • 3 posts

Posted 24 March 2012 - 10:54 PM

Dear community,

I have trouble with a gmk-file.
I create one object - its always the same. And after few time - absolute randomly - the variable "level" is unknown. Then there is no way to solve the problem.
if I use:
if !variable_local_exists("level") level = 0
, the variable will be deleted in the next step. And i have no idea what happens.
If I try to export the GMK Data, and import it again, all variables are unknown (all local, and all global, absolutely all)
Its like a big worm inside of the project file, what destroy the game while running.

I use the Game Maker since 2006, and it's not the first time, I have a problem like this. But the last time I could solve the problem with export > import.
This time it seems all work i had with my project was in vain

Have someone a hint for me?
Please don't ask me for the project file.
  • 0

#2 darkclower

darkclower

    GMC Member

  • New Member
  • 80 posts
  • Version:GM8

Posted 24 March 2012 - 11:54 PM

This is so weird. This happens to me too. I think it's some kind of Game maker bug...


But try this instead:
if !variable_local_exists("level") {level = 0;}
or
if (!variable_local_exists("level")) {variable_local_set("level",0);}

Sometimes doesn't Game maker really get the code and gets confused.
I hope it works, and I would really like to hear how this problem gets solved.
  • 0

#3 Rhutos

Rhutos

    GMC Member

  • GMC Member
  • 3 posts

Posted 25 March 2012 - 12:21 AM

This is so weird. This happens to me too. I think it's some kind of Game maker bug...


But try this instead:

if !variable_local_exists("level") {level = 0;}
or
if (!variable_local_exists("level")) {variable_local_set("level",0);}

Sometimes doesn't Game maker really get the code and gets confused.
I hope it works, and I would really like to hear how this problem gets solved.


Wow, thanks, it seems to work.
Its like the game maker did not interpreted my code
I'll report, if i have similar problems.

Edited by Rhutos, 25 March 2012 - 12:21 AM.

  • 0

#4 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 16838 posts
  • Version:GM:Studio

Posted 25 March 2012 - 12:22 AM

Are you sure you havenīt declared the variablw with "var" elsewhere?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users