News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

makeobj warnings & errors?

Started by seeker, April 13, 2011, 09:16:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

seeker

Hi all, a newbie here...

The answer is probably staring right back at me, but I can't see it.

Using makeobj on bulk-carriage.dat with the following original lines compiles perfectly:

EmptyImage[S]=bulk-carriage.0.0
EmptyImage[N]=bulk-carriage.0.1
EmptyImage[E]=bulk-carriage.0.2
EmptyImage[W]=bulk-carriage.0.3
EmptyImage[SE]=bulk-carriage.0.4
EmptyImage[NW]=bulk-carriage.0.5
EmptyImage[NE]=bulk-carriage.0.6
EmptyImage[SW]=bulk-carriage.0.7
freightimagetype[0]=Sand
FreightImage[0][S]=bulk-carriage.3.0
FreightImage[0][N]=bulk-carriage.3.1
FreightImage[0][E]=bulk-carriage.3.2
FreightImage[0][W]=bulk-carriage.3.3
FreightImage[0][SE]=bulk-carriage.3.4
FreightImage[0][NW]=bulk-carriage.3.5
FreightImage[0][NE]=bulk-carriage.3.6
FreightImage[0][SW]=bulk-carriage.3.7
freightimagetype[1]=Eisenerz
FreightImage[1][S]=bulk-carriage.2.0
FreightImage[1][N]=bulk-carriage.2.1
FreightImage[1][E]=bulk-carriage.2.2
FreightImage[1][W]=bulk-carriage.2.3
FreightImage[1][SE]=bulk-carriage.2.4
FreightImage[1][NW]=bulk-carriage.2.5
FreightImage[1][NE]=bulk-carriage.2.6
FreightImage[1][SW]=bulk-carriage.2.7
freightimagetype[2]=Kohle
FreightImage[2][S]=bulk-carriage.1.0
FreightImage[2][N]=bulk-carriage.1.1
FreightImage[2][E]=bulk-carriage.1.2
FreightImage[2][W]=bulk-carriage.1.3
FreightImage[2][SE]=bulk-carriage.1.4
FreightImage[2][NW]=bulk-carriage.1.5
FreightImage[2][NE]=bulk-carriage.1.6
FreightImage[2][SW]=bulk-carriage.1.7
freightimagetype[3]=Stone
FreightImage[3][S]=bulk-carriage.4.0
FreightImage[3][N]=bulk-carriage.4.1
FreightImage[3][E]=bulk-carriage.4.2
FreightImage[3][W]=bulk-carriage.4.3
FreightImage[3][SE]=bulk-carriage.4.4
FreightImage[3][NW]=bulk-carriage.4.5
FreightImage[3][NE]=bulk-carriage.4.6
FreightImage[3][SW]=bulk-carriage.4.7


Using makobj on this lumber wagon returns a warning message:
"WARNING: More freightimagetype (0) than freight_images (0)!"

The .dat compiles, and the pak seems to work correctly.

EmptyImage[S]=veh-wood-new.0.0
EmptyImage[N]=veh-wood-new.0.1
EmptyImage[E]=veh-wood-new.0.2
EmptyImage[W]=veh-wood-new.0.3
EmptyImage[SE]=veh-wood-new.0.4
EmptyImage[NW]=veh-wood-new.0.5
EmptyImage[NE]=veh-wood-new.0.6
EmptyImage[SW]=veh-wood-new.0.7
freightimagetype[0]=Holz
FreightImage[S]=veh-wood-new.1.0
FreightImage[N]=veh-wood-new.1.1
FreightImage[E]=veh-wood-new.1.2
FreightImage[W]=veh-wood-new.1.3
FreightImage[SE]=veh-wood-new.1.4
FreightImage[NW]=veh-wood-new.1.5
FreightImage[NE]=veh-wood-new.1.6
FreightImage[SW]=veh-wood-new.1.7
freightimagetype[1]=Bretter
FreightImage[S]=veh-wood-new.2.0
FreightImage[N]=veh-wood-new.2.1
FreightImage[E]=veh-wood-new.2.2
FreightImage[W]=veh-wood-new.2.3
FreightImage[SE]=veh-wood-new.2.4
FreightImage[NW]=veh-wood-new.2.5
FreightImage[NE]=veh-wood-new.2.6
FreightImage[SW]=veh-wood-new.2.7


This warning occurs with both the original pak64 SVN 'horses.dat' and my slightly modified shown above. I have looked at this closely, and cannot spot any inconsistency.

1) Can anyone spot an error in the wood wagon image data list?
2) Can anyone tell me what the warning is telling me?
3) Is there any documentation available on makeobj error messages?

Thanks in advance for any help forthcoming.




prissi

This code of pak64 here is wrong. The [1] freightimage will be ignored ...

There is no list of error messages; there can be even error messages from libpng printed in between.

seeker

Sorry, prissi, I don't understand. Why does one compile without a warning and the other with? And what would be the correct syntax?

VS

#3
The first has FreightImageType[n] and FreightImage[n][?] both set for all n=0..3.

The second says FreightImageType[0] and FreightImageType[1], but has FreightImage[?] - twice without the first index, which implies [ 0]. So you end up one set of cargo images short. Additionally, the images are set twice, each time to different values. Not sure which is actually used, but that doesn't matter much.

You probably copy-pasted the FreightImage lines from a vehicle that does not specify more than one cargo graphic. In that case, the first index is omitted (defaults to 0 as already said) and FreightImageType too, since the 0-th one is implicitly assumed to be the same as what is set in freight=?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

seeker

#4
Thank you VS, I see it now...

FreightImage( )(S)=veh-wood-new.1.0
                 \
                  Missing index!

I am getting old...

Actually, prissi is correct, the (incorrect) lines are from the 'horses.dat' file in the current SVN. I only changed to a newly modified .png.

VS, I think we are even. I recently re-introduced you to hex editors, you've re-introduced me to dimensioning arrays.

VS

Just think of all the awesome concepts we could explore! :P

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!