BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Strange warning message: the object with an index of 0 has been declared twice

2 posters

Go down

Strange warning message: the object with an index of 0 has been declared twice Empty Strange warning message: the object with an index of 0 has been declared twice

Post by Phonteus Nevolius Fri Dec 27, 2019 4:45 pm

In recent OpenBVE builds (1.7 and up) RouteViewer gives me an error message that I don't really understand:

The object with an index of 0 has been declared twice. The most recent declaration will be used.

Strange warning message: the object with an index of 0 has been declared twice Declar10

It doesn't refer to a specific object. I checked everything to see if I mistakenly declared an index twice but couldn't find any errors. The route where I have this problem is here (I quickly put it inside a .7z archive):

https://drive.google.com/open?id=1EBVLGVxlTqq2WcpvRDJG9msmfRLKg1Mr

OpenBVE 1.6 and before doesn't produce this error message.

Can anyone help me figure this out?
Phonteus Nevolius
Phonteus Nevolius

Posts : 120
Join date : 2017-10-05
Location : Hungary

https://phonteusnevolius.wordpress.com

Back to top Go down

Strange warning message: the object with an index of 0 has been declared twice Empty Re: Strange warning message: the object with an index of 0 has been declared twice

Post by leezer3 Fri Dec 27, 2019 7:13 pm

Interesting (and harmless....)

This is being caused by the Structure.Pole declaration.
The trouble here is that openBVE has internal 'compatability' poles, which occupy indices 0 through 3.
By declaring a new pole using index 0, you're overwriting this inbuilt one and triggering the warning.

The error message needs to be made a little more specific (which specific object type for starters), and probably fine-tuned to exclude the default poles somehow, but it's valid.

leezer3

Posts : 1960
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Strange warning message: the object with an index of 0 has been declared twice Empty Re: Strange warning message: the object with an index of 0 has been declared twice

Post by Phonteus Nevolius Fri Dec 27, 2019 8:16 pm

Thanks. I'll just use a diferent index number then.
Phonteus Nevolius
Phonteus Nevolius

Posts : 120
Join date : 2017-10-05
Location : Hungary

https://phonteusnevolius.wordpress.com

Back to top Go down

Strange warning message: the object with an index of 0 has been declared twice Empty Re: Strange warning message: the object with an index of 0 has been declared twice

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum