Jump to content


Photo

Works in 8.1 but not in Studio *[SOLVED]*


  • Please log in to reply
7 replies to this topic

#1 nickydude

nickydude

    MadLad Designs

  • GMC Member
  • 599 posts

Posted 15 April 2012 - 10:58 PM

* SOLVED *


I have 3 objects; obj_controller, obj_block_move_left and obj_block_move_right.

In the Create event of obj_controller I have the following Execute code:

// Speed of moving blocks
global.moveblock = random_range(1,2);

In the Create events of the other two objects I have the Move Fixed drag-and-drop icon, with "Speed: global.moveblock"

It runs fine in 8.1 (in which it was originally written in), but in Studio I get the following error:

#################################################################
VMError!! Occurred - Push :: Execution Error - Variable Get moveblock
at Object.obj_block_move_left.Create.0 (line -1) - <unknown source line>
#################################################################

Anyone know what's happening?

Edited by nickydude, 16 April 2012 - 11:47 AM.

  • 0

#2 wargasm

wargasm

    GMC Member

  • GMC Member
  • 189 posts

Posted 16 April 2012 - 01:26 AM

Same problem here....no replies yet.

http://gmc.yoyogames...howtopic=537017
  • 0

#3 fredcobain

fredcobain

    GMC Member

  • GMC Member
  • 165 posts

Posted 16 April 2012 - 02:08 AM

Please, report this issue at http://bugs.yoyogames.com

If you wont report the but, it cannot be noticed, and not fixed.
  • 0

#4 azcodon

azcodon

    GMC Member

  • GMC Member
  • 201 posts
  • Version:Unknown

Posted 16 April 2012 - 02:31 AM

save your project,and run again
  • 0

#5 nickydude

nickydude

    MadLad Designs

  • GMC Member
  • 599 posts

Posted 16 April 2012 - 10:45 AM

save your project,and run again


I did, many times. I've now solved it though, I deleted the controller object from the room then put it back again and it now works(?)
  • 0

#6 wagdog

wagdog

    GMC Member

  • GMC Member
  • 275 posts
  • Version:GM:Studio

Posted 16 April 2012 - 10:51 AM

Sounds like the create event of the block object(s) was getting fired before the controller object was created. I'm guessing the order you placethings in the room matters (actually, pretty sure that is the case).
  • 0

#7 nickydude

nickydude

    MadLad Designs

  • GMC Member
  • 599 posts

Posted 16 April 2012 - 11:33 AM

Odd, of all the stuff I've made in 6 / 7 / 8 & 8.1 I've never had that happen, thanks for the heads up. :)
  • 0

#8 dasrkrain

dasrkrain

    GMC Member

  • GMC Member
  • 196 posts
  • Version:GM:Studio

Posted 16 April 2012 - 06:52 PM

Ya wagdog is right. I ran into this exact same thing on Saturday! We just need to get used to how GMS works and it'll be fine! Kind of tough for us who've been using GM waaay back at 6!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users