A little help here?

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Circon
Posts: 1200
Joined: November 17th, 2003, 4:26 am
Location: Right behind Gwiti, coding

A little help here?

Post by Circon »

Does anyone have an idea why...

Code: Select all

	[side] 
	description=Gwiti Ha'atel
	type=Initiate
	side=1
	shroud=yes
	canrecruit=1
	controller=human
	recruit= Dark Adept,Ghost,Walking Corpse,Vampire Bat,Skeleton,Skeleton Archer
	[/side]
is making a computer-controlled side?? I've just spent half an hour trying to fix this, and ended up watching Gwiti's Revenants fight their way through the tower twice.
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Re: A little help here?

Post by Dacyn »

Code: Select all

	description=Gwiti Ha'atel
the apostrophe could be causing problems...
Last edited by Dacyn on June 7th, 2004, 3:37 pm, edited 1 time in total.
Circon
Posts: 1200
Joined: November 17th, 2003, 4:26 am
Location: Right behind Gwiti, coding

Post by Circon »

Never had that before, through several versions and levels.
This is for "Inside the Tower", 5th scenario.
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Re: A little help here?

Post by Dacyn »

well, earlier someone tried to use "Somebody's campaign" for the name of a campaign and it didn't work. Has something been changed, or does it only not work for campaign titles?

Code: Select all

	recruit= Dark Adept,Ghost,Walking Corpse,Vampire Bat,Skeleton,Skeleton Archer
er, there is a space between "recruit=" and "Dark Adept"...
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Can you post the full scenario? I'm not sure why it doesn't work.

The apostrophe could be causing problems if you're using a weird, evil Microsoft editor that uses the 'Microsoft only' apostrophes that aren't recognized in other encodings.

Otherwise it shouldn't be a problem.
Dacyn wrote: er, there is a space between "recruit=" and "Dark Adept"...
Shouldn't be a problem. Wesnoth strips off whitespace at either end of non-quoted WML values.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Circon
Posts: 1200
Joined: November 17th, 2003, 4:26 am
Location: Right behind Gwiti, coding

Post by Circon »

I use Wordpad and it works fine. No Micro$oft apostrophes or quote marks there (had that one VERY early on).

Strange thing: I tried Ctrl-X-ing the scenario to an older Wesnoth version. It worked fine. Then I copied it back and it suddenly started working. Huh. *slaps computer*.

Now, though, I'm getting this from the new Confrontation scenario:
'Error loading game configuration files: 'line 49101: Found illegal end tag: '/scenario', at end of 'message'' (The game will now exit)'
I don't HAVE 49101 lines of code. I don't even have 9101, and I've double-checked every message tag to make sure it's properly closed. Ah well, time to rreboot my computer, I suppose, Windows needs a reboot every week :roll:
Whole stderr.txt enclosed in small text to save space.
started game: 0
starting play_game
Initialized true type fonts
initialized managers
133
parsed arguments
133
checking mode possible...
32
Video mode must be emulated; the game may run slowly. For best results, run the program on a 16 bpp display
setting mode to 1024x768
initialized gui
177
BEGIN: loading config
177
BEGIN: read_game_cfg
no valid cache found. Writing cache to 'userdata/cache/game.cfg-cache-MEDIUM-NORMAL'
BEGIN: preprocessing file...
END: preprocessing file... (took 455ms)
WARNING: square bracket found in string. Is this a run-away string?
WARNING: square bracket found in string. Is this a run-away string?
...
...<My Edit: snipped WARNING x20 or so>
...
WARNING: square bracket found in string. Is this a run-away string?
WARNING: square bracket found in string. Is this a run-away string?
END: read_game_cfg (took 852ms)
END: loading config (took 852ms)
BEGIN: parsing config...
END: parsing config... (took 0ms)
loading map: '1'
loaded map: 1,1
BEGIN: terrain_builder::parse_config
Built terrain rules:
END: terrain_builder::parse_config (took 0ms)
BEGIN: terrain_builder::build_terrains
END: terrain_builder::build_terrains (took 1ms)
showing dialog '' 'Error loading game configuration files: 'line 49101: Found illegal end tag: '/scenario', at end of 'message'' (The game will now exit)'
Opening font file: fonts/Vera.ttf ...
opening font 'fonts/Vera.ttf' 12
opened font okay
Inserting font...
Opening font file: fonts/Vera.ttf ...
opening font 'fonts/Vera.ttf' 16
opened font okay
Inserting font...
BEGIN: config::write
END: config::write (took 0ms)
line 49101: Found illegal end tag: '/scenario', at end of 'message'
Thanks a lot for being so helpful!
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

Circon wrote:I don't HAVE 49101 lines of code.
this is probably in lines after macro expansion...
I wonder how hard it would be to have it be more specific.

er, have you checked the quotes as well as the message tags? Not having a quote can cause this same problem...
Circon
Posts: 1200
Joined: November 17th, 2003, 4:26 am
Location: Right behind Gwiti, coding

Post by Circon »

The thing is, I recall it being more specific, specifying a proper line, but this one doesn't even tell me where the fault is at all, so...
Blah.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

This is due to a bug, so that it'll report the line after preprocessing all files and concatenating them into one big WML document.

I'm fixing it so that in the next release it'll give hopefully more helpful messages :)

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Circon
Posts: 1200
Joined: November 17th, 2003, 4:26 am
Location: Right behind Gwiti, coding

Post by Circon »

Well, my waving a dead chicken over the file fixed it somehow, so I suppose the purpose of this thread was only to get better error messages...

Which isn't TOO bad an outcome. G'nite.
Post Reply