Jezla
Member
I'm getting a compile error that is unrelated to the actual code it points to. Here's the error:
Here's the script in question:
The script is called in the create event of my main controller object. The error didn't show up until I added the following line to the controller's draw GUI event:
If I comment out that line, the error goes away. Is this a bug, or is it a programming mistake that I'm missing?
EDIT: Okay, I changed the draw call to this:
and it worked without an error. What gives?
EDIT 2: Never mind, I just realized I was initializing the macros incorrectly. I shouldn't have put line terminators in the InitMacro script. One of the problems with trying to develop good habits, I guess, you forget when the exceptions to the rule occur.
Script: InitMacros at line 16 : Symbol , or ) expected
Script: InitMacros at line 16 : Symbol ) expected
Script: InitMacros at line 16 : wrong number of arguments for function draw_text
Script: InitMacros at line 16 : Symbol ) expected
Script: InitMacros at line 16 : wrong number of arguments for function draw_text
Here's the script in question:
Code:
/// @desc InitMacros
/*
Initializes Game Macros
*/
//Keychecks
#macro K_RIGHT keyboard_check_pressed(vk_right);
#macro K_LEFT keyboard_check_pressed(vk_left);
#macro K_DOWN keyboard_check_pressed(vk_down);
#macro K_UP keyboard_check_pressed(vk_up);
#macro K_ENTER keyboard_check_pressed(vk_enter);
//Menu Positions
#macro MP_X 320;
#macro MP_Y 350;
#macro SEL_X 400; <----Line 16 that the error refers to
#macro SEL_Y 575;
The script is called in the create event of my main controller object. The error didn't show up until I added the following line to the controller's draw GUI event:
Code:
draw_text(SEL_X, SEL_Y, global.decision_txt);
EDIT: Okay, I changed the draw call to this:
Code:
var dx = SEL_X;
var dy = SEL_Y;
draw_text(dx, dy, global.decision_txt);
EDIT 2: Never mind, I just realized I was initializing the macros incorrectly. I shouldn't have put line terminators in the InitMacro script. One of the problems with trying to develop good habits, I guess, you forget when the exceptions to the rule occur.
Last edited: