stfc2 / UI

User Interface
http://www.stfc.it
4 stars 5 forks source link

Planet available points initialization #10

Closed kirirur closed 9 years ago

kirirur commented 9 years ago

There's a bug in create_planet() function when constant USER_START_BOOST is set to 0. The normal planet being created does not get planet_available_points field initialized correctly so it remain to its default value that it's zero. With this value set, no buildings can be build.

Caberhagen commented 9 years ago

I tried your fix. Removed planets and execute populate world. Now we have an php error. Undefined variable max points. Am 22.11.2014 11:16 schrieb "Andrea Carolfi" notifications@github.com:

There's a bug in create_planet() function when costant USER_START_BOOST is set to 0. The normal planet being created does not get planet_available_points initialized correctly so it remain to its default value that it's zero. With this value set, no buildings can be build.

— Reply to this email directly or view it on GitHub https://github.com/stfc2/UI/issues/10.

kirirur commented 9 years ago

Hi,

I've found the problem: I thought global variable $MAX_POINTS was visible in the whole create_world function instead only if USER_START_BOOST has scope on it, I'll change the if/else.

kirirur commented 9 years ago

Should be finally ok now. Let me know if we can close this.

Caberhagen commented 9 years ago

I am on work now. I try it at home. Feedback follow...

Caberhagen commented 9 years ago

You are great. now it works fine. User creation and pop_worlds testet and working.

Kail72 commented 9 years ago

Are you two having fun? ^_^

2014-11-24 16:23 GMT+01:00 Caberhagen notifications@github.com:

You are great. now it works fine. User creation and pop_worlds testet and working.

— Reply to this email directly or view it on GitHub https://github.com/stfc2/UI/issues/10#issuecomment-64208934.

kirirur commented 9 years ago

Well yeah, we've found and fixed a couple of bugs! :)

Any news from you?