I have a plugin that I wrote. It contains a single function. Nothing else.
I call it from an event with a script call
Script : ASCheckAppointment();
But when it runs I get
Reference Error
ASCheckAppointment not defined
What could be causing it? Am I supposed to define it some other way or add something else to the .js file?
Code:
ASCheckAppointment = function() {
switch($gameVariables.value(175)) {
case 'MM': // Monday Morning
$gameVariables.setValue(177) = 1;
$gameVariables.setValue(178) = 1;
break;
case 'MA': // Monday Afternoon
$gameVariables.setValue(177) = 1;
$gameVariables.setValue(178) = 2;
break;
case 'ME': // Monday Evening
$gameVariables.setValue(177) = 1;
$gameVariables.setValue(178) = 3;
break;
// Several other entries similar to the above removed for sake of brevity.
default:
// code block
}
}();
I call it from an event with a script call
Script : ASCheckAppointment();
But when it runs I get
Reference Error
ASCheckAppointment not defined
What could be causing it? Am I supposed to define it some other way or add something else to the .js file?