News:

SimuTranslator
Make Simutrans speak your language.

List of available vehicles (without building depot)

Started by BBGunn, May 21, 2014, 02:06:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT


Quote from: Václav on December 19, 2014, 11:49:32 AM
I support this extension. But where to place button (or so) to show it?
List Manager perhaps. ???

Václav

Yes, I think so. It is usable place. And there vehicles could be filtered by type or so, too.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Ves

That is the place i put the window. Everyone agrees that this is the place to put it?

Spenk009

I agree, since it's a list it fits in there perfectly.

What thumbnail have you chosen?

Ves

I have made it possible to paint a new tumbnail, now I just use the signlist-thumbnail.

Ves

Im slowly getting forward, now the compile complaints with this error:

Error 2 error C2064: term does not evaluate to a function taking 2 arguments f:\spel\utveckla simutrans\simutrans källkod\simutrans.14.05.29\simutrans\trunk\tpl\vector_tpl.h 140 1 Simutrans


I have a strong suspicion that it is when i try to "fill list" I get that error. If I remove that section it compiles. I fail totally to figure out how to solve it, and it doesnt help that the error points to the vector-file instead of where in my code the problem is.

any ideas?

Ters

Line 140 in trunk vector_tpl.h is a call to the comparator function passed to insert_ordered. The comparator function you pass isn't a function taking two arguments. If I'm going to guess, it's because you pass a non-static member function, which has an implicit third parameter.

Ves

ah ok, so the class im trying to compare is having different amount of parameters than two?
Maybe also showing the output-section of the compiler could be helpfull to narrow down the problem


1>------ Build started: Project: Simutrans, Configuration: Release Win32 ------
1>  vehiclelist_frame_t.cc
1>gui\vehiclelist_frame_t.cc(18): warning C4005: 'SCL_HEIGHT' : macro redefinition
1>          f:\spel\utveckla simutrans\simutrans källkod\simutrans.14.05.29\simutrans\trunk\gui\extend_edit.h(22) : see previous definition of 'SCL_HEIGHT'
1>f:\spel\utveckla simutrans\simutrans källkod\simutrans.14.05.29\simutrans\trunk\dataobj\../tpl/vector_tpl.h(140): error C2064: term does not evaluate to a function taking 2 arguments
1>          gui\vehiclelist_frame_t.cc(95) : see reference to function template instantiation 'void vector_tpl<const vehikel_besch_t *>::insert_ordered<vehicle_scrollitem_t::sort_modes_t>(const T &,StrictWeakOrdering)' being compiled
1>          with
1>          [
1>              T=const vehikel_besch_t *
1>  ,            StrictWeakOrdering=vehicle_scrollitem_t::sort_modes_t
1>          ]
1>          gui\vehiclelist_frame_t.cc(95) : see reference to function template instantiation 'void vector_tpl<const vehikel_besch_t *>::insert_ordered<vehicle_scrollitem_t::sort_modes_t>(const T &,StrictWeakOrdering)' being compiled
1>          with
1>          [
1>              T=const vehikel_besch_t *
1>  ,            StrictWeakOrdering=vehicle_scrollitem_t::sort_modes_t
1>          ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Ters

Quote from: Ves on December 28, 2014, 10:03:03 PM
ah ok, so the class im trying to compare is having different amount of parameters than two?

No, not the class you are comparing. It's the function you are, directly or indirectly, telling vector_tpl to use when comparing two vehicle_besch_t instances in insert_ordered.

And the code with problems is at line 95 in vehiclelist_frame_t.cc

prissi

The comparing function ususally need to be static, since it is very tricky to init them with the corretc object in derived types.