-
Notifications
You must be signed in to change notification settings - Fork 31
AMX error codes
Zeex edited this page Jan 16, 2013
·
2 revisions
Below is a table of AMX runtime errors and their description (from the scripting point of view)
| ID | Error Text | Description |
|---|---|---|
| 0 | none | No error - successful return of the VM. |
| 1 | Forced exit | |
| 2 | Assertion failed | Expression inside an assert() statement is false. |
| 3 | Stack/heap collision (insufficient stack size) | Stack and heap grow in opposite directions sharing the same piece of memory, so they can eventually collide if there is not enough space. For example, if you declare a very very large local array, you'll certainly get this error. Another example could be very deep recursion. |
| 4 | Array index out of bounds | Attempted to read or write an element of the array at invalid position (index). |
| 5 | Invalid memory access | Attempted to read from or write to bad memory address i.e. outside of the data section. |
| 6 | Invalid instruction | Instruction pointer is messed up - most likely due to a buffer overflow. |
| 7 | Stack underflow | The stack pointer has gone beyond the stack bottom. |
| 8 | Heap underflow | The heap pointer has gone beyond the heap bottom. |
| 9 | No (valid) native function callback | |
| 10 | Native function failed | A native function has failed to execute correctly. For example, `fread` would raise this error when failed to allocate an internal buffer for reading the flle. |
| 11 | Divide by zero | |
| 12 | sleep mode | |
| 13 | reserved | |
| 14 | reserved | |
| 15 | reserved | |
| 16 | Out of memory | |
| 17 | Invalid/unsupported P-code file format | |
| 18 | File is of a newer version of the AMX | |
| 19 | File or function is not found | A native function has not been registered within the VM. This typically indicates a missing plugin or outdated server version. |
| 20 | Invalid index parameter (bad entry point) | Missing main(). |
| 21 | Debugger cannot run | |
| 22 | AMX not initialized (or doubly initialized) | |
| 23 | Unable to set user data field (table full) | |
| 24 | Cannot initialize the JIT | |
| 25 | Parameter error | |
| 26 | Domain error, expression result does not fit in range | |
| 27 | General error (unknown or unspecific error) |