Difference between revisions of "NestedQuotedString"
m (spelling) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
== Nested quoted string == | == Nested quoted string == | ||
− | If your add-on | + | If your add-on produces an error on the loading stage, and it looks like the quote below, then you can find a solution to your problem here. |
'''Nested quoted string''' | '''Nested quoted string''' | ||
Line 10: | Line 10: | ||
This error message consist of three parts: | This error message consist of three parts: | ||
− | * '''Error name.'''. In this case it is "Nested quoted string". | + | * '''Error name.'''. In this case, it is "Nested quoted string". |
− | * (upper) list of mainline files, which are core of Battle for Wesnoth | + | * (upper) list of mainline files, which are core of the Battle for Wesnoth |
* (lower) list of ''your add-on files''. Their names are usually started from "~add-ons/Add-on_Name", where Add-on_Name is the name of folder, which contains your add-on codebase. | * (lower) list of ''your add-on files''. Their names are usually started from "~add-ons/Add-on_Name", where Add-on_Name is the name of folder, which contains your add-on codebase. | ||
− | |||
'''Source of the error''' is some string, which misses double quote sign at the end. | '''Source of the error''' is some string, which misses double quote sign at the end. | ||
Line 21: | Line 20: | ||
speaker = narrator | speaker = narrator | ||
− | There is no double quote sign | + | There is no double quote sign at the end of caption value. In the other example, "message" key contains a multi-string value and lacks a double quote sign too: |
message = _"For this tutorial, you are playing Konrad. | message = _"For this tutorial, you are playing Konrad. | ||
Line 27: | Line 26: | ||
speaker = narrator | speaker = narrator | ||
− | '''To find source of the error,''' you need to check listed files from upper one to lower one. If you hadn't modified core files by yourself, then you can skip all mainline files listed in second part of the error message. Your add-on are started from: ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg and ends with ~add-ons/Add-on_Name/_main.cfg | + | '''To find source of the error,''' you need to check the listed files from the upper one to the lower one. If you hadn't modified core files by yourself, then you can skip all mainline files listed in second part of the error message. Your add-on file names are started from: ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg and ends with ~add-ons/Add-on_Name/_main.cfg |
− | In each file, go to line, which number is written after name of the file. For ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg you need to go to line 62. Then start looking upwards. If you haven't found the source of the problem in this file, then check next file in similar manner. | + | In each file, go to the line, which number is written after the name of the file. For ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg you need to go to line 62. Then start looking upwards. If you haven't found the source of the problem in this file, then check the next file in similar manner. |
− | '''To fix this error''' you need to add closing quote for string, which | + | '''To fix this error''' you need to add a closing quote for string, which produced the problem. For first example in this tutorial it will look like: |
caption= _"Welcome to Wesnoth!" | caption= _"Welcome to Wesnoth!" | ||
speaker = narrator | speaker = narrator | ||
− | Pay attention to the closing quote | + | Pay attention to the closing quote at the end of the string. |
message = _"For this tutorial, you are playing Konrad. | message = _"For this tutorial, you are playing Konrad. | ||
Line 41: | Line 40: | ||
speaker = narrator | speaker = narrator | ||
− | + | The closing quote should be at the end of ''second'' string. If you add a double quote at the end of the first string of "message" value, then you produce the other error. | |
[[Category: WML Tips]] | [[Category: WML Tips]] |
Latest revision as of 07:51, 2 November 2014
Nested quoted string
If your add-on produces an error on the loading stage, and it looks like the quote below, then you can find a solution to your problem here.
Nested quoted string at core/macros/image-utils.cfg:28 included from ai/ais/ai_default_rca_strong.cfg:2 included from _main.cfg:30 included from ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg:62 included from ~add-ons/Add-on_Name/_main.cfg:36
This error message consist of three parts:
- Error name.. In this case, it is "Nested quoted string".
- (upper) list of mainline files, which are core of the Battle for Wesnoth
- (lower) list of your add-on files. Their names are usually started from "~add-ons/Add-on_Name", where Add-on_Name is the name of folder, which contains your add-on codebase.
Source of the error is some string, which misses double quote sign at the end.
For example:
caption = _"Welcome to Wesnoth! speaker = narrator
There is no double quote sign at the end of caption value. In the other example, "message" key contains a multi-string value and lacks a double quote sign too:
message = _"For this tutorial, you are playing Konrad. You are standing in the keep, and your mentor Delfador is on the east side of the river. speaker = narrator
To find source of the error, you need to check the listed files from the upper one to the lower one. If you hadn't modified core files by yourself, then you can skip all mainline files listed in second part of the error message. Your add-on file names are started from: ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg and ends with ~add-ons/Add-on_Name/_main.cfg
In each file, go to the line, which number is written after the name of the file. For ~add-ons/Add-on_Name/scenarios/01_Scenario.cfg you need to go to line 62. Then start looking upwards. If you haven't found the source of the problem in this file, then check the next file in similar manner.
To fix this error you need to add a closing quote for string, which produced the problem. For first example in this tutorial it will look like:
caption= _"Welcome to Wesnoth!" speaker = narrator
Pay attention to the closing quote at the end of the string.
message = _"For this tutorial, you are playing Konrad. You are standing in the keep, and your mentor Delfador is on the east side of the river." speaker = narrator
The closing quote should be at the end of second string. If you add a double quote at the end of the first string of "message" value, then you produce the other error.