Runner Errors

Even after syntax checking in the code editor and then having the compiler check your code for compiler errors, there are still occasions when something can go wrong. In most cases this will throw a Virtual Machine (VM) runner error (also called a runtime exception) which looks like this:

Runner Error Window
Caption

Runner errors are generally more serious than compile errors as it means that there is something seriously wrong with your code that neither the code editor nor the compiler have been able to detect, and as such you should pay attention to all such errors. When one occurs, you can use the Copy button on the pop-up to copy the error to the clipboard which you can then paste into a text file (or wherever) for future reference.

The structure of this error is as follows:

As mentioned above, certain error messages will be identify the scope not by an instance ID value, but rather by a negative value. These values can be used to pinpoint the exact nature of the error and what it refers to with the following values possible:

PrefixScope
-1Self
-2Other
-3All
-4Noone
-5Global
-6Not Specified
-7Local

 

The possible errors from the VM runner are as follows:

ErrorMessageOperationDescription
DoSetInvalid comparison typeData TypesThis denotes that the runner has tried to compare two incompatible data types, like a real number with a string.
DoConvExecution ErrorData TypesThis denotes an error in the conversion of one data-type into another.
Argument Type(function) argument (index) incorrect type (wrong_type) expecting a (expected_type)Data TypesA value with the wrong data type was passed as an argument to the function at (index) (where an index of 1 is the first argument). A value of wrong_type was given but it should be one of expected_type instead.

DoAddExecution ErrorMathsSomething has gone wrong when using the addition (+) expression.
DoMulExecution ErrorMathsSomething has gone wrong when using the multiplication (*) expression.
DoSubExecution ErrorMathsSomething has gone wrong when using the subtraction (-) expression.
DoSubExecution Engine - Cannot operate on string typeMathsYou are trying to subtract the wrong type of variables (for example subtract a string from a real).
DoDivExecution ErrorMathsSomething has gone wrong when using the division (/ or div) expression.
DoDivExecution Engine - Cannot operate on string typeMathsYou are trying to divide the wrong type of variables (for example divide a string by a real).
DoDivDivide by zeroMathsYou are attempting to divide by 0 (note this will only happen when using integer division, dividing a (non-zero) real by 0 will give infinity as an answer, dividing zero by zero will give NaN as an answer). You can check for these values with (is_infinity) and (is_nan)
DoModExecution ErrorMathsSomething has gone wrong when using the modulo (mod) expression.
DoModExecution Engine - Cannot operate on string typeMathsYou are trying to use modulo (mod) on the wrong type of variables (for example mod a string by a real).

DoAndExecution ErrorBitwiseSomething has gone wrong when using the bitwise "and" (&) expression.
DoAndExecution Engine - Cannot operate on string typeBitwiseYou are trying to use bitwise "and" (&) on the wrong type of variables (for example trying to "and" a string with a real).
DoOrExecution ErrorBitwiseSomething has gone wrong when using the bitwise "or" (|) expression.
DoOrExecution Engine - Cannot operate on string typeBitwiseYou are trying to use "or" (|) on the wrong type of variables (for example trying to "or" a string with a real).
DoXorExecution ErrorBitwiseSomething has gone wrong when using the bitwise "xor" (^) expression.
DoXorExecution Engine - Cannot operate on string typeBitwiseYou are trying to use "xor" (^) on the wrong type of variables (for example trying to "xor" a string with a real).
DoShlExecution ErrorBitwiseSomething has gone wrong when bitshifting left (<<) a value.
DoShlExecution Engine - Cannot operate on string typeBitwiseYou are trying to left bitshift (<<) the wrong type of variables (for example trying to bitshift a string).
DoShrExecution ErrorBitwiseSomething has gone wrong when bitshifting right (>>) a value.
DoShrExecution Engine - Cannot operate on string typeBitwiseYou are trying to right bitshift (>>) the wrong type of variables (for example trying to bitshift a string).

DoNegExecution ErrorNegateYou are trying to turn a variable type into a negative when this type does not permit such an operation.
DoNotExecution ErrorNegateYou are trying to "not" a variable type when this type does not permit such an operation.

PushExecution Error - Variable Index out of range (var)StackThe variable being accessed is out with the established range for the runner.
PushVariable Get (var)StackThe given variable has not been defined or is unknown.
PopVariable Index out of range (var)StackThe variable being accessed is out with the established range for the runner.
PopVariable Get (var)StackThe given variable has not been defined or is unknown.

WithCannot use global in with statementWithYou have tried to use "global" as a variable within a "with" statement, ie:
with (global)
   {
   //do something;
   }
WithCannot use local in with statementWithYou have tried to use "local" as a variable within a "with" statement, ie:
with (local)
   {
   //do something;
   }

DoCallExecution Engine type errorEngineThis is an undefined error within the Virtual Machine. You should file a bug report should this happen (see: The Help Menu for details on how to do this.
Stack Overflow-EngineA stack overflow occurs when too much memory is used on the call stack and when your game attempts to use more space than is available on the call stack (that is, when it attempts to access memory beyond the call stack's bounds, which is essentially a buffer overflow), the stack is said to overflow, resulting in a program crash. Restart your computer and GameMaker and if the error persists please get in touch with support and/or file a bug (as explained above).

Read VariableVariable not set before reading itVariable InitialisationYou are trying to access a variable that hasn't been set (i.e. initialised) yet. Assign a value to it first before trying to read it, e.g. variable = 100;. Only declaring a variable, using e.g. var variable; will also throw this error.