Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert fail #21

Closed
MarwanTredano opened this issue May 10, 2020 · 6 comments
Closed

assert fail #21

MarwanTredano opened this issue May 10, 2020 · 6 comments

Comments

@MarwanTredano
Copy link

I get the following error when trying to log in
"Parser error : Expected ')' in expression" referring to this line of code:
"assert(state_positions.has(user_id), "Server did not return valid state") "

Steps to reproduce:

I Installed Docker On Windows.
I Opened the terminal and navigated to the nakama/ directory.
I ran the command run boot.bat in Windows.

I got the message "Startup done".

Then I created 2 separate accounts (I checked on the Nakama Server, they are existing accounts)
and tried to log in, got that error

@NathanLovato
Copy link
Contributor

NathanLovato commented May 10, 2020

Thanks for the report. So you can log in, create a character, and enter the game when registering an account, but not when using the login menu?

Also, could you confirm this happens not when clicking on "login", but when double clicking on a character (i.e. when joining the game level) ?

@NathanLovato
Copy link
Contributor

I can't reproduce the issue here unfortunately. Could you also confirm you're using Godot 3.2 stable?

@NathanLovato
Copy link
Contributor

@Razoric480 any idea of where this could come from? The error happens in GameWorld.join_world():

func join_world(
	state_positions: Dictionary,
	state_inputs: Dictionary,
	state_colors: Dictionary,
	state_names: Dictionary
) -> void:
	var user_id := ServerConnection.get_user_id()
	assert(state_positions.has(user_id), "Server did not return valid state")

@Razoric480
Copy link
Contributor

Razoric480 commented May 10, 2020

It really shouldn't. The first thing the server does when a user joins is add them as an entry in the various state tables, so at the very least, they should at least be in the resulting Dictionary as empty but present data (I.E. x and y at 0,0). See world_control.match_join().

@MarwanTredano could you put a breakpoint at the start of join_world and inspect the contents of the state_positions Dictionary? If it's empty or if something looks weird about the entries?

@MarwanTredano
Copy link
Author

it was a Godot version issue, i was still on 3.1 ... Sorry for the inconvenience, its now working :)

@NathanLovato
Copy link
Contributor

Good to know, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants