Server script error

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Server script error

Post by petert »

My question/problem is, I include spaces in the script, why don't they show up in-game? I need the spaces so that the stars are all even.
Attachments
Script_Error.png
Script_Error.png (54.46 KiB) Viewed 1026 times
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Server script error

Post by Rubidium »

Variable width fonts don't have fixed width characters, i.e. not all characters have the same width. As such you can't align with spaces.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Server script error

Post by petert »

Thanks for the quick reply, I understand. Is there any way to align them?
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Server script error

Post by Zuu »

Not perfectly, but you can do some trial and error to get them better aligned by inserting the amount of spaces requried to make the stars align as good as possible in-game. If it is possible to use color codes, you can insert black characters to get space-looking characters that have a width other than the regular space width.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Server script error

Post by planetmaker »

Trying to align manually is of not much use in OpenTTD with fonts. The font and size is chosen by the player and such things may look completely differently on the screen of another person.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: Bing [Bot] and 16 guests