SpriteErrors

From GRFSpecs

Jump to: navigation, search

Contents

Introduction

This page explains the error messages that may be generated due to incorrect pseudo-sprite data. It does not include the messages that are only generated by an action B.

All information on this page only applies to TTDPatch. OpenTTD has different error messages which are shown as plain text without numeric error codes.

List of sprite error messages

MessageMeaning
More sprites than specifiedThe file contains more sprites than the first pseudo-sprite specifies
Out of memoryTTDPatch could not read the sprite data because it ran out of memory
Wrong .grf versionEither the action 8 requires a different grf version, the file had no action 8, or the sprite uses an action that is not valid before action 8
Cannot load more spritesThe limit of active sprites has been exceeded
File file not foundThe file was listed in newgrf(w).cfg but could not be opened
File file has invalid sprite #nr (code code/pos)The pseudo-sprite data of the given sprite is invalid; see below for explanation of code and pos
File file is not a TTDPatch graphics fileThe first sprite is not a pseudo-sprite, or it does not specify a valid number of sprites

Invalid sprites

A pseudo-sprite has invalid data, if it does not follow the specifications of each action correctly. In this error message (starting with TTDPatch 2.0.1 alpha 46), the code defines what kind of error occured, and the position pos in most cases (i.e. whenever possible) points to the byte in the sprite that follows the one which triggered the error.

CodeMeaning
1A real graphics sprite was encountered where a pseudo sprite was expected
2The sprite uses an unknown action type, or this action is not valid before an action 8
3The sprite uses an unknown feature
4The sprite refers to an invalid vehicle/text/town part ID
5The sprite has fewer bytes than expected
6The given property number in action 0 is invalid
7The sprite block following action 1/5/A/11/12 would go beyond the end of the file
8The feature types of action 1, 2 and 3 don't agree
9Action 2 refers to an action 1 sprite block that is beyond the size of the most recent action 1 sprite block
10Action 2 (var./random) or action 3 refers to an action 2 cargo-id that hasn't been defined yet
11Action 7, 9 or D refers to an invalid variable number
12The grf file has multiple action 8 entries
13Action A refers to an invalid TTD sprite
14The message severity in action B is invalid
15The message type in action B is invalid
16The operation type in action D is invalid
17Action E is trying to deactivate an already-active file
18The number of parts in action F is zero when it must not be zero
19The bit number or count in action F is invalid
20Invalid label number in action 10
21Resource not valid for action D (ID out of range, or invalid for this resource type)
22Multiple action 11 present in GRF file, there may only be one
23A sprite that is part of action 11 is not a binary include file
24Attempt to modify ID not reserved with GRM (only with experimentalfeatures.mandatorygrm on)
25Invalid font number in action 12
26Range crosses 128-character block, must be split
27Invalid property value in action 0
28Invalid condition type in action 7/9
29Invalid industry tile ID in industry layout
30Inconsistent industry layout size
31Invalid subid in action3

Note, if you do not see the code or the position, you need to edit your ttdpttxt.txt file, and change the "invalidsprite" line into the following format (and then rerun mkpttxt.exe):

invalidsprite="\94File \"\80\" has invalid sprite #\7c (code \7c/\7c).\00"

Resource conflicts

If a GRF file attempts to allocate a resource that is not available, it will be deactivated and the following message will be shown: "GRF conflict with <other-grf> (resource <r-id> at sprite <num>)".

The following resources can cause conflicts. Numbers 0 and above are allocated by a GRM action D, negative numbers are automatically allocated by an action 0 (IDs), action 4 (persistent GRF texts) or actions 1/5/D/12 (sprites).

r-id(s)Resource
-12Duplicate GRFID
-11Persistent GRF texts
-10New industries
-9New industry tiles
-8New houses
-7New stations
-6House sprites
-5Plane sprites
-4Ship sprites
-3Road vehicle sprites
-2Train sprites
-1"Other" sprites
0..255Vehicle IDs
256..287Cargo IDs
288..319Cargo bits
Personal tools
advertisement