The World Of Perisno

Modding Area => Everything About Modding => Topic started by: Michadr on August 23, 2013, 01:06:59 pm

Title: Errors And How to Fix Them
Post by: Michadr on August 23, 2013, 01:06:59 pm
http://forums.taleworlds.com/index.php?topic=6575.msg96347#msg96347
or for quicker reference:


Error:
SyntaxError: invalid syntax
Meaning:
Missing a bracket, comma or quotation mark -- [], (), , or "" -- OR you have too many of them.

Error:
TypeError: list indices must be integers
Meaning:
Missing a comma/too many brackets.

Error:
ERROR: INPUT TOKEN NOT FOUND: <name>
NameError: global name 'cause_error' is not defined
Meaning:
You have a starting dialog-state -- example, [trp_constable_hareck,"constable_hareck_introduce_1", -- that isn't being led to by an ending dialog-state -- example, "close_window",[]],

Error:
ERROR: INPUT TOKEN NOT FOUND: <empty>
NameError: global name 'cause_error' is not defined
Meaning:
You have an empty starting dialog-state -- example, [trp_constable_hareck,"constable_hareck_introduce_1",

Error:
NameError: name '<something>' is not defined
Meaning:
Missing a prefix such as trp_, itm_ or mnu_ OR missing a name OR misspelled a name.

Error:
IndexError: tuple index out of range
Meaning:
Nebulous. If you're modding module_mission_templates.py, look for undefined alter flags and undefined AI flags, these are the most common source.

Error:
TypeError: int argument required
Meaning:
Missing an integer such as a mission-template flag. You can find out which calls are integers by looking at Armagan's documentation at the beginning of each module file, (int) calls being integers.

Error:
IndexError: list index out of range
Meaning:
There's an error in one of your list calls -- a list is anything between brackets.

Error:
Error: Unable to find object:<name>
ERROR: Illegal Identifier:<name>
Meaning:
The object you're trying to call does not yet exist OR there is a misspelling in the name.