arunkumarmunusamy / bitfighter

Automatically exported from code.google.com/p/bitfighter
Other
0 stars 0 forks source link

Getting the bot's name (and a few other things) in main() is too soon [LUA] #442

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. getName() in main

What is the expected output? What do you see instead?
You expect the bot's name, but you get "Robot"

What version of the product are you using? On what operating system?
019c

Please provide any additional information below.
This will also happen for a few other things; I don't remember which though

Original issue reported on code.google.com by corteocarl on 6 Jun 2014 at 12:26

GoogleCodeExporter commented 9 years ago
Forgot to specify, it fails when I call getName() on the bot itself in main(), 
in the bot code

Original comment by corteocarl on 6 Jun 2014 at 1:31

GoogleCodeExporter commented 9 years ago
Talked it over in IRC - 

This is intended behavior:  c++ will load main() first, then load getName() 
right afterwards.  This will allow the bot to dynamically change it's name in 
main() if wanted (like SentinelBot does)

Original comment by buckyballreaction on 6 Jun 2014 at 1:39