Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Mar 20, 2019 6:49 pm

All times are UTC




Post new topic  Reply to topic  [ 209 posts ]  Go to page Previous 17 8 9 10 11
Author Message
PostPosted: Thu Jan 14, 2016 9:18 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4549
Location: /home/sweden
From the looks of it, you probably got SuperLib 39 installed as dependency. (otherwise it should have had an error about that)

The line that triggers the error looks like this:
Code:
    constructor() {   
        GSLog.Info("Loading Economy ", Log.LVL_WARNING)     // <------------ Line 36 in econ/econ.nut
    }


One problem I see here is that it mix GSLog with Log which is not going to go well. However the error is about LVL_WARNING not existing which is also true.

SuperLib.Log has these levels defined:
Code:
   /* Log levels: */
   static LVL_INFO = 1;           // main info. eg what it is doing
   static LVL_SUB_DECISIONS = 2;  // sub decisions - eg. reasons for not doing certain things etc.
   static LVL_DEBUG = 3;          // debug prints - debug prints during carrying out actions



Users of SuperLib can call SetIsLevelAcceptedFunction to inject a different function to decide if a log message should be outputed or not if they like to introduce more levels. Or create your own constants with value 1, 2 and 3, as I would very unlikely change these values as too much code depend upon the log system.

stinkyfax:As you probably understood, this is an error in the script code. So you'll have to wait for the author to upload a fixed version.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
PostPosted: Thu Jan 14, 2016 11:56 am 
Offline
Traffic Manager
Traffic Manager

Joined: Fri Dec 16, 2011 5:08 pm
Posts: 166
I believe the correct thing to do would be to replace said line of code with just:

Code:
GSLog.Info("Loading Economy");


Top
   
PostPosted: Fri Jan 15, 2016 5:47 pm 
Offline
Engineer
Engineer

Joined: Thu Mar 28, 2013 8:12 pm
Posts: 28
Still waiting for the update of a script, thank you.


Top
   
PostPosted: Thu Feb 18, 2016 4:49 pm 
Offline
Engineer
Engineer

Joined: Thu Apr 07, 2011 2:17 pm
Posts: 63
noticed that when town still have 0 demands, the Next demand line wasn't shown correctly so, in Towngrowth.nut, line 495
(only change is from "GSTown.SetText(id, GSText(GSText.STR_CITYBUILDER_CONCAT01," to "GSTown.SetText(id, GSText(GSText.STR_CITYBUILDER_CONCAT02,")

Code:
             if(next != -1) {
                   GSTown.SetText(id, GSText(GSText.STR_CITYBUILDER_CONCAT01,
                      GSText(GSText.STR_CITYBUILDER_TW_HAMLET),
                      GSText(GSText.STR_CITYBUILDER_TW_NEXT, 1 << econ.enable_order[next], econ.enable_populations[next])));
                } else {


must be
Code:
             if(next != -1) {
                   GSTown.SetText(id, GSText(GSText.STR_CITYBUILDER_CONCAT02,
                      GSText(GSText.STR_CITYBUILDER_TW_HAMLET),
                      GSText(GSText.STR_CITYBUILDER_TW_NEXT, 1 << econ.enable_order[next], econ.enable_populations[next])));
                } else {


Well, at least this way started showing correct values (cargo and population). No idea if there's other cases (only found this ^^), this Concat strings are heavy stuff :D


Top
   
PostPosted: Fri Feb 19, 2016 11:27 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Fri Dec 16, 2011 5:08 pm
Posts: 166
That's a nice observation; I'll push it to the repository. The whole CONCAT_xyz thing is a bit of an ugly workaround to be able to 'build' a custom string in the town window while still having access to nice features such as translation and coloured text, yet one needs to know the exact amount of parameters in each string used in the concatenation to be able to concatenate them this way, it's a bit cumbersome to use.

The script currently also dumps the same information to the story book by the way; that can support larger amounts of information more readily since a page can contain multiple strings. Each town gets its own page, and it just updates monthly like the town windows do.


Top
   
PostPosted: Wed Jul 06, 2016 8:31 pm 
Offline
Engineer
Engineer

Joined: Thu Jul 09, 2015 10:44 am
Posts: 9
i have a bug when i load a saved game with version 117:


Attachments:
Capture.PNG
Capture.PNG [ 7.22 KiB | Viewed 2176 times ]


Last edited by marhex on Thu Jul 07, 2016 4:23 pm, edited 1 time in total.
Top
   
PostPosted: Thu Jul 07, 2016 3:39 am 
Offline
Engineer
Engineer

Joined: Thu Jul 07, 2016 3:32 am
Posts: 1
fix:

in Towngrowth.nut line 694 there is a missing + between Assim and GSTown.xxxxx:


Code:
--- Towngrowth.nut   2016-07-07 00:36:56.000000000 -0300
+++ Towngrowth.nut   2016-07-06 19:40:17.000000000 -0300
@@ -691,7 +691,7 @@
                 if(f2 < 0){f2 = 0;}
                 local c = f1 + f2; // + sqrt(f1) * sqrt(f2) * 2 << Removed for optimization...
                 if(GSController.GetSetting("debug_level") > 6) {
-                    GSLog.Info("Assim: " GSTown.GetName(tid) + " and "+ GSTown.GetName(this.id) + "req " + c);
+                    GSLog.Info("Assim: " + GSTown.GetName(tid) + " and "+ GSTown.GetName(this.id) + "req " + c);
                 }
    // optimization: reuse f1
                 f1 = GSTown.GetDistanceSquareToTile(tid,loc);


Top
   
PostPosted: Fri Aug 05, 2016 4:38 am 
Offline
Engineer
Engineer

Joined: Fri Aug 05, 2016 4:29 am
Posts: 1
I'm likely doing something very wrong as I'm trying to setup a single player game using CityBuilder for fun and practice. In doing so no matter what settings I select I'm ending up with the following error:

Attachment:
File comment: Error message received a couple months into every game.
CityBuilderError.png
CityBuilderError.png [ 24.89 KiB | Viewed 2018 times ]


Can anyone help me with what I'm doing wrong? It looks like it's running into trouble while trying to calculate a score of some sort for the individual towns.


Top
   
PostPosted: Sat Feb 16, 2019 9:28 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9209
Location: Sol d
So... is this still actively maintained? It crashed on me, shortly after start


Attachments:
Unnamed, 18th May 1971.png [526.9 KiB]
Not downloaded yet

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 209 posts ]  Go to page Previous 17 8 9 10 11

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.