It's kinda wierd, the whole situation. Here is the player's code:
//This is the player's stuff
//For sprites
#include "Sprites.agc"
#include "Functions.agc"
type oPlayer
x as float
y as float
spriteIndex as integer
hsp as float
vsp as float
endtype
//Start the player
function playerStart(playerObject ref as oPlayer)
//Movement stuff
x = 0
y = 0
hsp = 0
vsp = 0
//Set the player's basic values
spriteIndex = SprPlayer
//Start the player in the middle
playerObject.y = 540 / 2
endfunction
//Will be executed every frame
function playerFrame(playerObject ref as oPlayer)
//Set the player's position
playerObject.y = playerObject.y + getDirectionX() * 10
SetSpritePosition(1, 100, playerObject.y)
//Clamp it's playerObject.y
playerObject.y = clamp(playerObject.y, 0, 540 - GetSpriteHeight(1))
endfunction
The function playerStart runs just fine. But when it gets to playerFrame it gives the error. So that would lead me to believe it is not out of scope. Here is where it is used:
//The main function of the game
//Includes
#include "Objects.agc"
function main()
// set window properties
SetWindowTitle( "Starbourne Rogue: Revenge" )
SetWindowSize( 960, 540, 0 )
// set display properties
SetVirtualResolution( 960, 540 )
SetOrientationAllowed( 0, 0, 1, 1 )
//16:9
SetDisplayAspect( 1.77 )
do
playerFrame( ObjPlayer )
Print("Starbourne Rogue: 2 dev build")
Sync()
loop
endfunction 0
main()
In the file Objects.agc the player object is created and started.
Gamejolt: http://gamejolt.com/profile/united-calamity/575975