Solution: Message showing twice, possibly cut

The place to post your WML questions and answers.

Moderators: Developers, 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.

Solution: Message showing twice, possibly cut

Postby Dugi » July 30th, 2013, 8:36 am

I am not asking anybody for help, just this problem might happen to somebody else and I think it is good if a solution to it is available.

I have found a hard to debug problem. If pango formatting (that is, the <b> or <i> things) is messed up somewhere, a strange error appears, causing the previous message to display instead of the new one.

If the code looks like this:
Code: Select all
[message]
 speaker=Krakatulus
 message= _ "I was standing in my room, completely alone, when suddenly..."
[/message]
[message]
 speaker=Krakatulus
 message= _ "I heard a fart that <b>wasn't mine</i>."
[/message]

You will first see a message 'I was standing in my room, completely alone, when suddenly...' and then 'I was standing in my room, completely a'. This is because the message's length was read correctly, but the text failed to load, and so it read what was in the variable holding the text before, and that was the previous message.
Last edited by Dugi on July 31st, 2013, 6:56 am, edited 1 time in total.
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3373
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: Solution: Message showing twice, possibly cut

Postby 8680 » July 30th, 2013, 7:50 pm

This would appear to me to be a bug. Please report it at Wesnoth’s issue tracker on Gna.
User avatar
8680
Moderator
 
Posts: 745
Joined: March 20th, 2011, 11:45 pm

Re: Solution: Message showing twice, possibly cut

Postby Dugi » July 31st, 2013, 6:56 am

Done.
Legend of the Invincibles - single player campaign, trying to be an expansion to regular Wesnoth, where units can advance indefinitely, gear becomes an important factor and tons of new abilities increase the game's variety.
User avatar
Dugi
 
Posts: 3373
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains

Re: Solution: Message showing twice, possibly cut

Postby 8680 » July 31st, 2013, 7:57 am

Dugi wrote:Done.

Thanks.

(For the record, the bug report is #20996 on Gna.)
User avatar
8680
Moderator
 
Posts: 745
Joined: March 20th, 2011, 11:45 pm


Return to WML Workshop

Who is online

Users browsing this forum: No registered users and 1 guest