Argument count for scripts
Reporter: RobertBColton | Status: closed | Last Modified: September 13, 2016, 07:11:26 pmWe have not added argument_count and the syntax checker should also check for it.
I would like to add to this ticket an issue in the GMOgre port.
http://enigma-dev.org/forums/index.php?topic=2398
An object obj_skybox calls the script in its create event skipping arguments leading to a runtime debug error that a string is used like a real argument.
EnableSkyBox("Examples/CloudyNoonSkyBox");
I tested the following in GM8.1
script0
x = argument0;
show_message(argument1);
object0 :: create event
script0("test");
I received the following run-time error.
ERROR in
action number 1
of Create Event
for object object0:
Illegal argument count calling script "script0".
Script requires 2 arguments, 1 have been supplied.
So our syntax checking needs to be able to resolve argument_count for scripts.
Leave a commentView this issue on GitHub
Please sign in to post comments, or you can view this issue on GitHub.