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
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.
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.
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.
DirectX could not detect your mouse. Make sure that a mouse is connected and a recent DirectX version is installed on your PC.
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.
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.
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.
Some operation that accessed the video device, f.i. preloading the entity environment light, was executed in the first frame before video initialization.
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.
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 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.
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.
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.
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 error happened (development version only). Note the circumstances, and contact Gamestudio 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.
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).
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.
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.
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.
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.
Too many entities are placed in the level. The maximum number can be set through max_entities.
Too many terrain chunks, entity types, or entity clones are used in the level. The maximum number can be increased by increasing the nexus.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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,, 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 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.
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.
An engine function, likeor , was called with an invalid pointer or handle.
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.
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.
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.
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.
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.
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 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.
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 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.
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
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
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 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