peteb / tankage

Multiplayer 2D tank game; drive around in a mutable world together with friends
10 stars 2 forks source link

New config property doesn't work #36

Closed peteb closed 13 years ago

peteb commented 13 years ago

Using a new config property when a config file is present throws an exception. Must remove the config file first. This is bad.

kskels commented 13 years ago

Did you get an exception by adding variable by hand or trying to get it from the game?

peteb commented 13 years ago

I ran ./tankage client.predict=0, reading the variable is not a problem I guess, but setting it on the cmdline.

kskels commented 13 years ago

Yeah, that's the thing! I did not allow user to set anything he wants.. The cmd configuration is run before game and it checks first if the variable is already there.. If they are not there it will throw an exception, the problem is that user can otherwise add anything in the configuration file..

When you run the game first time it will create all the variables that game uses with the default values. So there next time you start the game you can set those variables.. Now it's ~/.tankage.conf that is used instead of ~/.snail-wail.conf . You probably didn't delete the cfg file but started the game one more.. maybe..

peteb commented 13 years ago

it's not a problem that the user can add anything in the config file, really. there will be lots of problems when the game is updated, with new variables, and people have to remove their configs

kskels commented 13 years ago

no, you don't need to remove the config file. You need to start game once and close, then you can use new variable from command line when starting next time.. are you sure you needed to remove the config file?

kskels commented 13 years ago

ok!

kskels commented 13 years ago

This works now!

peteb commented 13 years ago

yup, fixed