Page 9 of 10

Re: Traffic lights (r17455)

Posted: 20 Jun 2012 14:57
by Eddi
the typical process of "bumping" goes like this:
  1. pick the last known "good" revision
  2. compile, to check whether things work
  3. apply the patch to that revision
  4. compile, to check whether things work (possibly also run some functionality tests)
  5. pick a step size (100 revisions seems to be a good start)
  6. run an update for this step size
  7. check if there were merge errors
  8. compile, to check whether things work (possibly also run some functionality tests)
    1. if things worked, save your current progress in a new patch file, and go back to step 1, until you reached the current revision.
    2. in simple cases, you try to fix the errors directly by looking at the context, then proceed with step 7
    3. if nothing helps, go back to step 1, and choose a smaller step size in step 5, to isolate which revision failed, then check that revision for clues how to fix your errors (often it contains similar changes in other places)
knowledge in programming languages are necessary for step 9b/c

you should not try to bump two patches simultaneously. bump each patch individually and then merge them in the end.

Re: Traffic lights (r17455)

Posted: 22 Jun 2012 15:31
by Streckenläufer
Hello,
the patch has so far worked out quite well, except for the 2 bugs that I've described here last post.

Re: Traffic lights (r17455)

Posted: 24 Jun 2012 17:20
by Streckenläufer
Hello,

I trafficlights_r24349.diff "Apply SVN patch" to run properly.
If I start a new game I'm going to Advanced Settings> construction and I am now on the setting "Traffic Lights" is click the above is the error message:

Message: Assertion failed at line 59 of D :/ Spielen/OTTDSource/MinGW/msys/1.0/home/emily/svn.openttd.org/trunk/src/strings_func.h: size <= parent.num_param - parent.offset

OpenTTD hangs.

Re: Traffic lights (r17455)

Posted: 24 Jun 2012 18:01
by ChillCore
Yes I have noticed that the patch crasches in this case (after you mentioning it).

There are some errors in the language files that I am trying to solve and should fix the issue.
Almost there. ;)


My understanding of the German language is not that good.
Can you please tell me about the second error that you mentioned?

Thank you for reporting.

Re: Traffic lights (r17455)

Posted: 24 Jun 2012 19:34
by Streckenläufer
Hello chill core,
The second error was caused by me when I tried to translate to the language file englisch.txt ind german.txt, then came the error:

Warning: Param idx # 0 'STRING' does not match with template command 'String1'

Look here, the black DOS window.

The patch does not translate german.txt to Settings> Construction now when I click the option "traffic light" then click on the warning window appears and goes out with OpenTTD crash.log.

Re: Traffic lights (r17455)

Posted: 24 Jun 2012 21:38
by ChillCore
The picture "compiler_fehler.jpg" suggest multiple things:
- you did not use "STRING1" in the german translation did you? STRINGx is reserved for the english strings ... other languages are supposed to use STRING here (I changed STRING1 to STRING2 for now in english.txt to avoid the crash).
- There is a line mentioning the use of the same string twice ... you did not apply the patch twice without reverting the new files to dummy files did you?
- You should upgrade your version of svn as it is outdated ;)

The assertion that happens in "trafficlight_fehler.jpg" is due to the errors that I have partially solved in the language files (I think).
The crash does no longer happen in the attached patch but there still is an error present; when you set "Advanced Settings -> Construction -> Trafficlights -> Maximum TL consist size" to zero then a date will appear.
The date appearing is the first error; being able to set it to "zero" is the second as the minimum is specified as 1 in table/settings.ini.
I absolutely have no clue yet why this happens.

The crash.txt you attached sais "Version: r (0)" ... how did you obtain the source of OpenTTD? Did you dowload the zip from openttd.org and patch that?
Better is to check out the source using your SVN client as instructed here http://wiki.openttd.org/Category:Compiling_OpenTTD ; that way your source is under version control and you will be able to update it to a different revision. ;)

Re: Traffic lights (r17455)

Posted: 25 Jun 2012 09:02
by Streckenläufer
Hello chill core,

I update my trunk after each revision, the revision number was from the beginning, since I use TortoiseSVN, not sent or registered. I have the latest version of TortoiseSVN v1.7.7 and still get the "Subversion 1.7 or greater" message. I already have about 10-15 Compiles and revisions can live with that without number.

Yes, I have the *. source.zip these patches from the trunk and is updated each version from the trunk.
I have now and get your trafficlights_r24349.diff the warning window patching.

Re: Traffic lights (r17455)

Posted: 25 Jun 2012 13:12
by Eddi
you use tortoisesvn to check out openttd, but the build system tries to use the command line svn (to find out version, changes, etc.), which is somewhere in your path, but it is an older version, thus it cannot read the checkout you did with tortoisesvn. that is the error message you get.

Re: Traffic lights (r17455)

Posted: 25 Jun 2012 14:55
by Streckenläufer
Hello Eddie,

my version of TortoiseSVN is the latest, which is the latest OpenTTD source, subversion is the latest.
The message is the same.

I remove old versions before installing new versions of its full length.
This is not the actual fault, which lies somewhere in the processing of the language file for patching.

I've already added several patches and received no error messages. The warning of an older Subversion I have often, but not intrusive and does not affect the compiler.

Re: Traffic lights (r17455)

Posted: 25 Jun 2012 15:04
by Eddi
read again. this is not about your version of TortoiseSVN, but your version of the command line svn (likely installed through cygwin or mingw). these are both svn clients, but they are different programs. like Firefox and Internet Explorer are both browsers, but each is a completely separate program, with different versions

Re: Traffic lights (r17455)

Posted: 25 Jun 2012 15:29
by Streckenläufer
#Eddi,

It is about the subversion folder in the TortoiseSVN / bin / svn.exe and not the MinGW is the latest.
In the forum of TortoiseSVN described that can occur with a change in the language file from English to German this message if I keep the English language file I get no message bem compilation.

#ChillCore,

have now re-installed everything again, and the traffic light patch Compiles, now get the following error message.
It seems to affect only the English language file.

Re: Traffic lights (r17455)

Posted: 25 Jul 2012 15:50
by Streckenläufer
ok, it worked, it goes :)

Re: Traffic lights (r17455)

Posted: 04 Feb 2013 17:56
by kyosuke1989
Is this feature mature enough for trunk if everything works as excepted? It could be nice in larger, and why not smaller cities. :)

Re: Traffic lights (r17455)

Posted: 13 May 2013 14:42
by Raihan Yafie
can i installed to my openTTD?

Re: Traffic lights (r17455)

Posted: 14 May 2013 06:15
by kamnet
Raihan Yafie wrote:can i installed to my openTTD?
You have to download the source code for OpenTTD and then apply the Traffic Lights patch to the code. Then you must include the additional NewGRF for graphics with the binary.

Re: Traffic lights (r17455)

Posted: 14 Jun 2013 18:03
by emiel17
When i start openttd with traffic lights it says that there are no files for the game please help

Re: Traffic lights (r17455)

Posted: 14 Jun 2013 20:14
by ChillCore
Welcome to the forums, emiel17

http://www.tt-forums.net/viewtopic.php? ... &start=147

At the bottom of the post are the correct sprites you need.
There should be a readme in the zip?

If you need more help then this do not hesitate to ask. ;)

Re: Traffic lights (r17455)

Posted: 14 Jun 2013 21:10
by emiel17
well my next question is does it work on the 1.3.1 version of openttd?

Re: Traffic lights (r17455)

Posted: 14 Jun 2013 21:34
by ChillCore
It would if someone(TM) updated it.
But there is little point in doing that anyway, better is to keep patches against trunk itself when updating. ;)

Re: Traffic lights (r17455)

Posted: 14 Jun 2013 21:52
by 3298
Patches are never made for any stable version of OpenTTD because modifying it means it isn't the same stable game anymore.
Also, the 1.3 series is roughly r25000 with a bunch of bugfixes backported from trunk. Current trunk is at roughly r25400. This patch is for r17455. That's quite a big difference, so it is almost certainly not compatible. I once updated a patch that was a bit more than 2000 revisions behind trunk. That was difficult enough. Now with almost 8000 revisions to go, you would spend several weeks with the update, coding. If you don't know C++, add some more weeks to learn it.
But I believe ChillCore has a heavily modified version of this patch in his patchpack based on r22555. You can play that one instead, even though it's still older than 1.2.

PS: Ninja'd by the one I'm talking about, why didn't you advertise your own patchpack?