Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2779 closed defect (fixed)

[PATCH] JS warnings in the game setup screen for guest players

Reported by: Stan Owned by: Itms
Priority: Should Have Milestone: Alpha 17
Component: UI & Simulation Keywords:
Cc: Patch:

Description (last modified by Itms)

When playing on the lobby I get those warnings. (See attached screenshot)

Attachments (2)

Sans titre.png (126.1 KB ) - added by Stan 10 years ago.
2779.diff (1.8 KB ) - added by Andrew 10 years ago.

Download all attachments as: .zip

Change History (7)

by Stan, 10 years ago

Attachment: Sans titre.png added

comment:1 by Itms, 10 years ago

Component: Core engineUI & Simulation
Description: modified (diff)
Keywords: simple added
Milestone: Alpha 17Backlog
Summary: JS Warnings in the lobbyJS warnings in the game setup screen for guest players

These are just warnings for data that are not well initialized when the player can't choose the map, the advanced options, etc.

This is not urgent and I think it's a good ticket for people willing to tackle their first bug. To fix that, the idea would be to add checks in the gamesetup.js code.

by Andrew, 10 years ago

Attachment: 2779.diff added

comment:2 by Andrew, 10 years ago

Keywords: review patch added
Milestone: BacklogAlpha 17
Summary: JS warnings in the game setup screen for guest players[PATCH] JS warnings in the game setup screen for guest players

comment:3 by Itms, 10 years ago

Owner: set to Itms
Resolution: fixed
Status: newclosed

In 15802:

Fix GUI errors when a client joins a multiplayer game setup room.

Based on a patch by cwprogger, fixes #2779

comment:4 by Itms, 10 years ago

Keywords: simple review patch removed

Thanks for that patch!

We're currently in feature freeze for the next alpha release, so sadly we didn't find time to review this patch quickly. The patch wasn't perfect but to save time I decided to correct it and commit, instead of making you improve it and learn things, so I apologize here. Fixing that is really needed for A17, which gets closer and closer!

I'll make comments here:

  • The functionnality was not perfect, i.e. a problem was fixed indeed, but not the other one. The place you added a fix was not the faulty place for the "map selection" error. I encourage you to take a look at the committed code to see what actually failed.
  • The code style was ok, don't hesitate to improve the current quality when you see some code doesn't follow the wiki:Coding_Conventions (we often make mistakes!) (I'm talking about the if(()&&()) instead of if(() && ()), see your patch). We're used to writing if (foo) instead of the explicit if (foo !== undefined) when we can, for code readability, even if the latter is good.

We're looking forward more contributions from you, thanks for working on this! :)

comment:5 by agentx, 10 years ago

Just want to mention, that if (foo) and if (foo !== undefined) behave different in case of foo having one of these values "", 0, NaN.

Note: See TracTickets for help on using tickets.