title: Variable Issue in GameMaker Studio
body: <p>On obj_player I have a Create and Step event</p>
  
  <p>Create:</p>
  
  <pre><code>/// Intialize Variables      
  grav = 0.2;      
  hsp = 0;     
  vsp = 0;      
  jumpspeed = 7;     
  movepseed = 4;    
  key_left = 0;
  key_right = 0;
  move = key_left + key_right;    
  </code></pre>
  
  <p>Step:</p>
  
  <pre><code>//Get the player's input       
  key_right = keyboard_check(vk_right);      
  key_left = -keyboard_check(vk_left);    
  key_jump = keyboard_check_pressed(vk_space);     
  
  //React to inputs      
  move = key_left + key_right;      
  hsp = move * movespeed;      
  if (vsp &lt; 10) vsp += grav;      
  
  if (place_meeting(x,y+1,obj_wall))        
  {         
      vsp = key_jump * -jumpspeed        
  }        
  
  //Horizontal Collision     
  if (place_meeting(x+hsp,y,obj_wall))         
  {       
      while(!place_meeting(x+sign(hsp),y,obj_wall))       
      {          
          x += sign(hsp);        
      }       
      hsp = 0;         
  }               
  x += hsp;       
  
  //Vertical Collision     
  if (place_meeting(x,y+vsp,obj_wall))     
  {        
      while(!place_meeting(x,y+sign(vsp),obj_wall))    
      {    
          y += sign(vsp);    
      }    
      vsp = 0;     
  }       
  y += vsp;    
  </code></pre>
  
  <p>Error Message:</p>
  
  <pre><code>___________________________________________
  ################################################################################    ############
  FATAL ERROR in
  action number 1
  of  Step Event0
  for object obj_player:
  
  Variable obj_player.movespeed(100011, -2147483648) not set before reading it.
   at gml_Object_obj_player_StepNormalEvent_1 (line 8) - hsp = move * movespeed;
      ################################################################################    ############
  </code></pre>
  
  <p>Whats wrong with this code? Ive been stuck on it for a couple days now, just really confused as I have seen this code work in action and for other people in this video <a href="https://www.youtube.com/watch?v=IysShLIaosk" rel="nofollow noreferrer">https://www.youtube.com/watch?v=IysShLIaosk</a> (after my original question I added some changes from advice:) <a href="https://gamedev.stackexchange.com/questions/131436/variable-problem-in-gamemaker-studio">https://gamedev.stackexchange.com/questions/131436/variable-problem-in-gamemaker-studio</a></p>