Engine Error Messages

At startup the engine will first compile the script, and then execute it. Syntax errors in the script are indicated during compilation. The line in question is also indicated, allowing to find and fix the error. Pressing [Esc] aborts the compilation process.

Sometimes syntax errors are not obvious. If the line in question is ok, look for an error in the previous line, like a non-closed bracket or a missing semicolon. An error of the type

Can not translate OP:TYPE1:TYPE2:TYPE3

An numeric operation was attempted with wrong parameter types, for instance an AND or OR operation with a float or double type; or you've written a code line that makes no sense at all.

Code size exceeded

You've written an giant program that is bigger than the initial size limit of 6 MB. Increase the nexus to allocate more program memory; it goes up by 1 MB for each 10 MB nexus memory.

Aside from script syntax errors, error or warning messages indicating a malfunction can be issued by the engine at startup or during runtime. If the problem is not obvious, run the engine in -diag mode and check the acklog.txt for a more detailed log of the problem.

Warning W71: Can't play sound

Attempt to play a sound that can't be used here; in most cases a stereo sound was played as a 3D sound by ent_playsound or snd_play functions. For stereo or background sounds use the media_play function.

Error E155: Can't open mouse device

DirectX could not detect your mouse. Make sure that a mouse is connected and a recent DirectX version is installed on your PC.

Error E351: Corrupted engine (possible virus!)

An attempt to hack or modify the engine was detected, probably due to a virus infection. Close all programs and run a virus scanner at once.

Error E355: Startup failure

The engine won't start this published project because the published project folder (.CD) contains wrong content - for instance, when a file was deleted or modified after publishing. Make sure that the project starts fine in development mode, that you have no duplicate files in your project folders and that the .CD folder contains the original content that was generated by the publish process. Also look for error messages during the publish process that indicate missing files.

Error E356: Problem with script

The script could not be executed. Either it contains a syntax error that is indicated and has to be fixed. Or it was not found in the current directory. Or it was modified after publishing.

Error E1001: Untitled file

You have probably forgotten to save the level or script before running it. Use Save As.. to give the file a name.

Error E1004: Not enough memory (xxx MB required)
Error E1005: Out of memory

A Windows memory allocation (malloc or new function) failed. All today's PCs should have enough virtual memory (more than 2 GB), so you'll normally never see this error message. Check if your PC is misconfigured or set up to a very low virtual memory size. Another reason for this error message can be a too-high nexus value (exceeding the recommended limit) or a damaged model, sound or image file with a wrong internal size.

Error E1100: Can't open level
Error E1101: Bad WMB format
Error E1107: Unsupported WMB version

The WMB file was not found or damaged, or compiled with a newer WED version that this not supported with this engine. Re-compile it.

Warning W1102: Initialize video before

Some operation that accessed the video device, f.i. preloading the entity environment light, was executed in the first frame before video initialization.

Warning W1103: Compiled without meshes

The WMB file was compiled with an old Gamestudio version or in A6 mode, and does not contain meshes (see Map Compiler). Re-compile it. This warning is only issued when the warn_level variable is set to 4 or above, or when a function requires an A7 compatible level, such as decals or decal shadows.

Error E1104: Invalid texture size
Error E1105: Bad texture animation

The WMB file contains textures that have an invalid size (not divisible by 16), or their animation cycle does not begin with +0 or is interrupted.

Warning W1108: Oversized texture

This texture size is not supported on many target systems. This warning is issued with textures bigger than 4096x4096 pixels if the warn_level variable is set to 3 or above. Unless you need a big texture size for sky cubes or sprite animations, avoid textures above 1024x1024.

Error E1112: Bad size

The bitmap file contains a wrong texture size.

Error E1115: Bad format

The file contains an invalid format - for instance, a bitmap with an unusual color depth or compression format that is not supported by DirectX. Please see file formats for the supported formats.

Error E1192: Unsupported feature

You've attempted to use a feature that is not supported by your edition. See editions.

Error E1198: Bad file format

Crash while loading a file (development version only). A file header is damaged and caused a software crash either during the load process of the damaged file, or when loading a subsequent file. Check carefully all model and image files.

Error E1201: Nexus too small

You have to increase the nexus memory (see: -nx command line option or WED Map Properties) for this level, or - if the nexus is already at the recommended limit of 200 MB - reduce the number of elements in the level. This message is only issued in the development version. It is not fatal; if the nexus is too small, memory is allocated at runtime.

Error E1220: General Error

An internal error happened (development version only). Note the circumstances, and contact Gamestudio Support.

Error E1230: Not enough video memory

Your 3D video card is not suited for DirectX games because it offers not enough memory for basic functions such as screen buffer or memory management.

Error E1241: Can't open DirectX device
Error E1246: 3D driver failure

You need a DirectX 9 compatible video card for running DirectX applications. All video cards manufactured after 2003 normally will do. But if the device still can't be opened, either the video driver or the DirectX library is damaged or not properly installed on your PC. Install the latest DirectX version, and download the correct driver for your video card from the manufacturers website. For very old 3D cards of the last century, use weak mode (command line option -w3d).

Error E1299: Trial version timed out.

The run time of the trial engine has expired.

Warning W1301: Can't open file

The given file was not found in the path or resource.

Error E1302: Bad MDL format

The given model file was damaged or has a wrong format.

Warning W1305: Bad File Name

This warning is only issued when the warn_level variable is set to 2 or above. The entity file name contains invalid characters such as ' ', '/' or '\' - the latter is interpreted as a path and will lead to publish errors.

Warning W1306: Oversized

This warning is only issued when the warn_level variable is set to 2 or above. The entity is too big and split in too many parts by the BSP tree at it's current position. Therefore the BSP culling can not be used for that entity, resulting in a slower frame rate. The number of BSP splits for an entity can be minimized by placing its origin at its center position.

Error E1308: Can't be rendered

The entity can't be rendered by your hardware. Normal video cards can only render meshes of up to 65536 vertices or triangles. For a terrain, use chunks.

Warning W1309: Bad texture size

Some of the entities' skins are not a power of 2 in size. In most cases the engine will fix the skin automatically, but this is not possible here (f.i. because the entities' skins have different sizes). The entity will be rendered, but with partially wrong skin coordinates. Open the entity in MED and manually fix the skin size. This warning is only issued when the warn_level variable is set to 1 or above.

Error E1310: Bad scale value

The entity is too small, too big, or otherwise ill-scaled (see scale) so that it can't be visible on screen with this scale value.

Error E1320: Action undefined

An action assigned to an entity is not found in the script. Maybe you've renamed or deleted the action, or the action name does not follow the naming convention. This warning is only issued when the warn_level variable is set to 2 or above.

Error E1340: Not enough entities reserved

Too many entities are placed in the level. The maximum number can be set through max_entities.

Error E1341: Too many chunks or entity types

Too many terrain chunks, entity types, or entity clones are used in the level. The maximum number can be increased by increasing the nexus.

Warning W1351: Can't open file
Warning W1352: Can't play sound

The sound or animation file was not found or has an invalid format.

Warning W1401: Client/Server communication trouble
Warning W1402: Client/Server buffer overflow

The client/server connection was interrupted for more than a second, or too much entities were created by ent_create at the same time.

Warning W1403: Too many clients

More clients try to connect than entities are available in the level. The client is rejected. Increase max_entities.

Warning W1404: Incompatible engine versions

The client uses an engine with a different protocol version, and is rejected.

Warning W1407: Invalid join attempt

A client running in a wrong mode - for instance, with a different game level - attempted to join the session. Only issued by the Development Engine in server mode.

Warning W1500: Failed (...)

A function could not successfully perform its task. This warning is issued when warn_level is set to 3 or above. The function name or reason of the problem is given in the message.

Warning W1501: Empty Pointer

You are using a pointer that was not initialized or does not point to any valid object. Typical beginner's mistakes are using an entity pointer before it was set up in another action, or after it became invalid due to removing the entity.

Warning W1502: Possible endless loop

You have probably forgotten to place either a wait or some termination check in the loop of the given function. Read the script tutorial about loops.

Warning W1503: Invalid array index

You gave an index that exceeds the array length.

Warning W1504: Negative argument

You used an arithmetic function with a wrong argument, like a negative value for a square root.

Warning W1505: Heap damage

Your script accessed an invalid memory area within the last frame. This can happen for instance when calling functions with wrong numbers or types of arguments, or writing past the end of an array.

Warning W1506: Too many functions

The reserved memory area for functions was exceeded. Probably you are creating non-terminating functions in an infinite loop. The memory required by a function depends on its variables and pointers. Functions only consume memory when they run. The nexus (see: -nx command line option or WED Map Properties) determines the memory area reserved for functions in units of 2 kB (f.i. 80 kB for a nexus value of 40, enough for about 10,000 simultaneously running functions). The number of running functions is displayed in the [F11] panel.

Error E1507: Video functions not available before first frame

You called a DirectX function already before DirectX was initialized in the first frame. Use wait(1) to wait for the end of the first frame when a DirectX device is available.

Warning W1508: Can't load

You've used game_load for loading a .sav file that was saved by a different game or script file; or engine objects (other than level entities) were created between saving and loading. Variables or objects could have been overwritten, so better exit and restart (after deleting the faulty .sav file).

Warning W1509: Avoid save/load in same frame

You've attempted to execute several game_load or level_load operations at the same time. Only one load operation is possible per frame cycle - the others won't be executed.

Warning W1510 - Inkey already active

An attempt was made to run inkey() twice at the same time.

Warning W1511 - Invalid call in event

The given event function calls a forbidden instruction that changes something in the level or can trigger an event itself, like c_move, ptr_remove, ent_create, c_trace, c_scan, video_switch etc. in the first cycle of the event. Insert a wait(1) before executing such instructions in an event function. This warning is only issued if the warn_level variable is set to 2 or above.

Error E1512: Empty prototype ...

An empty function prototype was called. This can happen when the function body is missing, or a function was called from a DLL that doesn't exist or was not found. Check the acklog.txt - functions with missing bodies are listed there. A frequent cause of this error is using a plugin that could not be loaded on the target system - for instance, using ackphysX functions on a system where PhysX was not installed.

Error E1513: Script crash in...

A function of your script crashed. The usual suspects are accessing an empty pointer, accessing a non-empty pointer to a removed or nonexistent object, or performing an invalid operation such as dividing by 0. Crashes are only indicated in the development engine. The distributable version will not issue an error message, but just try to recover from the error and terminate the function.
The name of the erroneous function is displayed in the error message, followed by the 3-character sys_marker (if any was set), so the bug should be easy to find in your script. If you get a crash right at startup or level loading, a damaged sound, image, or model file might be the reason. Another possible reason is a wrong setting of the DEP (Data Execution Prevention) in your Windows system configuration that prevents running scripts.

Error E1514: Invalid pointer or handle

An engine function, like handle or ptr_for_handle, was called with an invalid pointer or handle.

Error E1515: Invalid arguments

A function was called with a wrong argument type or number, or a NULL pointer when a valid object pointer is expected. The expected type is indicated in the message.

Error E1516: Invalid memory area

A function such as ptr_remove, ent_remove, or sys_free was called with an invalid or already-freed pointer; or an allocated memory area was overwritten by a damaged file or script bug. This error is only issued if the warn_level variable is set to 2 or above. You can use the sys_marker function to find out where the memory area was allocated.

Error E1520: Structs inconsistent

Mismatch of engine object structs. Usually a result of modifying, copying or otherwise tampering with system headers, or of a script bug that overwrites engine object structs.

Error E1517: No level

You're attempting to modify your level, usually by placing entities in it, but have forgotten to load that level before. If you don't know what a level is and how to load it, read the lite-C tutorial.

Error E1521 - can't load DLL

The plugin DLL can not be loaded. It's either not a valid DLL or does not run on the target system because it uses another DLL - for instance, a certain DirectX library - that's not installed there.

Error E1525 - object not available for DLL

The warning messages by a5dll_getwdlobj about trying to access a nonexistent variable or function are only issued if warn_level is set at 2 or above. Otherwise a5dll_getwdlobj returns NULL and the DLL must handle this error.

Warning E1527

Warning issued by the error function in your script.

Warning W1550 - Error in effect

The effect or shader can not be compiled, either due to a syntax error, or because the shader compiler DLL is missing. The line number will be indicated in the error message. When writing your own shaders, do not forget to include the d3dcompiler_42.dll for publishing.

Warning W1551 - Effect unsupported by hardware

The technique uses a feature or shader version that is unsupported by the 3D card. Never forget to add a fallback technique to any effect in your released game. The DirectX Caps Viewer gives information about which features are supported by your hardware.

Warning W1552 - Normal or height map missing

This warning is only issued when the warn_level variable is set to 1 or above. A shader contains a matTangent matrix or a REQUIRE_NORMAL or REQUIRE_HEIGHT bool variable, but a normal or height map is missing on the block or model.

Warning W1553 - Can't create alpha

The texture has no standard content (BMP, PCX, or TGA) and can't be automatically converted to an overlay or alpha texture. This warning is only issued when the warn_level variable is set to 1 or above

Warning W1554 - Material undefined

The assigned MATERIAL name is not defined in the script. This warning is only issued when the warn_level variable is set to 2 or above

Warning W1602 - Too many contacts

This warning is only issued when the warn_level variable is set to 3 or above. A physics collision exceeded the number of available contacts. Increase ph_max_contacts.

Error E1603 - Physics not enabled

You're calling a physics function without a loaded level or with enable_polycollision disabled.

Error E2000 - D3D error

The DirectX device encountered a general error.

Error E2005 - Can't create D3D texture

The texture format is invalid or unsupported by your video card. Very old video cards often don't support DirectX 9 and can not create textures of the given size or format.

 

► latest version online