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
Indicates an numeric operation with wrong parameter types, for instance an AND or OR operation with a float or double type. In that case, typecast the expression to the correct type.
Aside from script syntax errors, the following error or warning messages can be issued by the engine at startup or during runtime:
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.
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.
A published engine could not start. Possible reasons are modifications to the executable, resource, or script after publishing. This can also happen if the .CD folder contained old content. Delete the .CD folder and publish again.
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.
You have probably forgotten to save the level or script before running it. Use Save As.. to give the file a name.
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.
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.
This warning is only issued when the warn_level variable is set to 4 or above. The WMB file was compiled with an old Gamestudio version, or compiled without meshes (see Map Compiler). Re-compile it.
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.
This texture will be displayed in reduced quality on most systems - for instance a texture bigger than 2048 pixels or a cubemap bigger than 256x256 pixels. For supporting old 3D cards, do not use textures bigger than 1024x1024. This warning is only issued if the warn_level variable is set to 2 or above.
The bitmap file contains a wrong texture size.
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.
You've attempted to use a feature that is not supported by your edition. See editions.
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. A6 only; in A7 the nexus is automatically increased.
An internal crash happened. Note the circumstances, and contact the Conitec support.
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.
If the D3D device can't be opened, the DirectX library is probably damaged or not properly installed on your PC. Install DirectX 9.0c or above, and the correct driver for your video card.
E1242 is issued when the D3D device can be opened, but a video device is not available for the given resolution. The engine tries some lower and higher resolutions before giving up. You need a 3D video card for running DirectX applications. Further possible reasons are installation of a wrong video driver, or an extremely high nexus setting (above 500 MB) that consumed all the virtual memory.
If your 3D card encounters an internal driver failure, download fixed drivers from the manufactorer's site. For very old 3D cards, attempt to use weak mode (-w3d).
The run time of the trial engine has expired.
The given file was not found in the path or resource.
The given model file was damaged or has a wrong format.
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.
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.
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.
This warning is only issued when the warn_level variable is set to 1 or above. 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.
The entity is too small, too big, or otherwise ill-scaled. It would never be visible on screen with this scale value.
You've renamed or erased the entity behaviour action out of the file, or the action name exceeds the 20 character size of the WED behavior panel.
What it says: You have to increase either the nexus or max_entities.
The sound or animation file was not found or has an invalid format.
The client/server connection was interrupted for more than a second, or too much entities were created by ent_create at the same time.
More clients try to connect than entities are available in the level. The client is rejected. Increase max_entities.
The client uses an engine with a different protocol version, and is rejected.
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.
You are using a pointer that was not initialized, and therefore does not exist in the scope of this function. Refer to the manual about pointers and how to use them (see "Script-Traps").
You have probably forgotten to place a wait or a termination in the loop of the given function. Read the script tutorial about loops.
You gave an index that exceeds the array length.
You used an arithmetic function with a wrong argument, like a negative value for a square root.
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.
More functions are running than the internal function scheduler can handle (normally around 10,000 per frame). Probably you are creating non-terminating functions - not necessarily the indicated one - in an infinite loop.
You called a DirectX function in the first frame before DirectX was initialized. Use wait(1) to wait for the second frame when a DirectX device is available.
You've used game_load for loading a .sav file that was saved by a different game or script file. Variables or objects could have been overwritten, so better exit and re-start (after deleting the faulty .sav file).
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.
An attempt was made to run inkey() twice at the same time.
This runtime warning message will be issued when the given event function contains bad script code -a forbidden instruction (see "Event-Traps") 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.
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 function in your script crashed. Usual mistakes are accessing an empty pointer, dividing by 0, or doing something with a nonexistent entity. Crash errors are only indicated in the development engine. The distributable version will not issue an error message, but just crash the program. The name of the faulty function is indicated (A7.2), so the error should be easy to find and fix. 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.
An engine function, like handle or ptr_for_handle, was called with an invalid pointer or handle.
A function was called with a wrong argument type , or a NULL pointer when a valid object pointer is expected. The expected type is indicated in the message.
The processor stack was damaged in the last frame, probably due to calling a function with a wrong number of arguments. This error only appears in old C-Script files; in lite-C the number of arguments is checked at compile time. For finding the guilty function, out-comment function calls until the message disappears.
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, read the tutorial.
The DLL can not be loaded. It's either corrupted or does not run on the target system because it uses another library that's not installed there.
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 issued by the error function in your script.
The effect or shader script has a syntax error. The line number will be indicated by the error message.
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.
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.
You're calling a physics function without a loaded level or with enable_polycollision disabled.
The DirectX device encountered a general error.
The texture format is invalid or unsupported by DirectX or by your video card.
► latest version online