I
iAnzenGenki
Guest
Just trying to follow along with Mr. Spalding's tutorial on calling scripts and ran into errors on lines 1 and 5 (this is in the script I'm trying to use):
I know he made this tut on the earlier version and some changes were made to calling scripts with function -enter whatever script name here-
I did follow back to what changes were made and I'm still baffled but this is probably a very easy fix. I know when you first create a script it has that function (script name) with looping brackets...I just deleted them because they weren't what he was coding. My code is exactly like his and no errors popped up on his screen.
EDIT: I accidentally used an equal sign in the Macro script...which somehow pulls the errors into the script I'm calling the value from...odd but fixed.
GML:
//Update Sprite
var _cardinalDirection = round(direction/90);
var _totalFrames = sprite_get_number(sprite_index) / 4;
image_index = localFrame + (_cardinalDirection * _totalFrames);
localFrame += sprite_get_speed(sprite_index) / FRAME_RATE;
if (localFrame >= _totalFrames)
{
animationEnd = true;
localFrame -= _totalFrames;
} else animationEnd = false
I know he made this tut on the earlier version and some changes were made to calling scripts with function -enter whatever script name here-
I did follow back to what changes were made and I'm still baffled but this is probably a very easy fix. I know when you first create a script it has that function (script name) with looping brackets...I just deleted them because they weren't what he was coding. My code is exactly like his and no errors popped up on his screen.
EDIT: I accidentally used an equal sign in the Macro script...which somehow pulls the errors into the script I'm calling the value from...odd but fixed.
Last edited by a moderator: