The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Yona-TYT on October 08, 2016, 08:43:00 AM

Title: Problems placing text labels.
Post by: Yona-TYT on October 08, 2016, 08:43:00 AM

Problems placing text labels.
Scenario: Tutorial-%28test2%29.zip (http://www.mediafire.com/file/lwioiwulds7g0i5/Tutorial-%28test2%29.zip)
Savegame: Tutorial3.sve (http://www.mediafire.com/file/yqrw13jujj4u42h/Tutorial3.sve)
class_chapter_03.nut (63)
For some reason I can not put a label using the human player "label_x.create(label1, player_x (0), translate(" Form here "))", but if possible when are using the public service.
(https://www.mediafire.com/convkey/f010/wphwmixo0p49fbu6g.jpg)

Other players show this error.

(https://www.mediafire.com/convkey/8b97/x7n152d5tbak6ig6g.jpg)
Title: Re: Problems placing text labels.
Post by: Dwachs on October 08, 2016, 11:08:01 AM
Commands issued by the scneario will be checked again by is_work_allwoed_*, which is a bug, and will be fixed soon.

The error message you are getting (cannot convert string) is issued, when squirrel cannot convert a string to a number. Not sure, what is wrong in your script.

Edit: the label-placing bug should be fixed in r7897.
Title: Re: Problems placing text labels.
Post by: Yona-TYT on October 08, 2016, 02:43:25 PM
Quote from: Dwachs on October 08, 2016, 11:08:01 AM
The error message you are getting (cannot convert string) is issued, when squirrel cannot convert a string to a number. Not sure, what is wrong in your script.
This error occurs when placed for example: "label_x.create(label1, player_x (2), translate(" Form here "))"
Title: Re: Problems placing text labels.
Post by: Dwachs on October 08, 2016, 02:58:49 PM
I could not reproduce this.
Title: Re: Problems placing text labels.
Post by: Yona-TYT on October 09, 2016, 10:18:44 PM

Quote from: Dwachs on October 08, 2016, 02:58:49 PM
I could not reproduce this.
I loaded this scenario to replicate: Tutorial-chapter3.zip (http://www.mediafire.com/file/o72p6gad8qtyubi/Tutorial-chapter3.zip)
Title: Re: Problems placing text labels.
Post by: Dwachs on October 19, 2016, 07:51:06 PM
The problem is that player_x(2) is not active. The program displays a completely unrelated error message. This is now changed with r7918
Title: Re: Problems placing text labels.
Post by: Yona-TYT on October 20, 2016, 01:44:01 AM
Quote from: Dwachs on October 19, 2016, 07:51:06 PM
The problem is that player_x(2) is not active. The program displays a completely unrelated error message. This is now changed with r7918
I did not realize that. :-[
Quote from: Dwachs on October 08, 2016, 11:08:01 AM
Commands issued by the scneario will be checked again by is_work_allwoed_*, which is a bug, and will be fixed soon.

The error message you are getting (cannot convert string) is issued, when squirrel cannot convert a string to a number. Not sure, what is wrong in your script.

Edit: the label-placing bug should be fixed in r7897.
By the way, text labels work very well. ;D