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

Keyword 'remotesync' in combination with variables break gdformat #209

Open
programmingBazi opened this issue Mar 28, 2023 · 5 comments
Open
Labels
bug Something isn't working formatter parser
Milestone

Comments

@programmingBazi
Copy link

programmingBazi commented Mar 28, 2023

Problem Description
I am currently using Godot==3.5 and gdtoolkit==3.5.0.
I have in my code variables that are marked with networking keywords.
For example:
remotesync var foo: int
or
remote var bar: int
The usage of networking keywords with variables currently break gdformat. Here is an example error message

remotesync var personal_rpc_id: int
           ^

Unexpected token Token(TYPE, 'var') at line 14, column 12.
Expected one of:
        * _NL
        * FUNC

Sadly i was not able to find documentation about GDScript and how to use networking keywords with variables. As my code works as expected, i guess the keyword is allowed to be used.

Expected behaviour
Formatter allows the use of networking variables together with variables.

Thanks in advance and thanks for these useful tools!

@Scony
Copy link
Owner

Scony commented Mar 28, 2023

I think there was something similar reported before - can you check if your game stops working if you remove remote/remotesync keywords from variables?

@Scony Scony added the discussion Let's discuss label Mar 28, 2023
@programmingBazi
Copy link
Author

programmingBazi commented Apr 2, 2023

If i remove the keyword i can't change the variable with the rset mechanism anymore.
e.g.: rset("foo", 20)

@Scony
Copy link
Owner

Scony commented Apr 2, 2023

If i remove the keyword i can't change the variable with the rset mechanism anymore. e.g.: rset("foo", 20)

Ok, thanks for info - it looks like indeed gdtoolkit lacks support of remote/remotesync variables. So far it supports only puppet. Do you know if it's possible to define variables with keyword other than remote/remotesync/puppet?

@Scony Scony added bug Something isn't working formatter parser and removed discussion Let's discuss labels Apr 2, 2023
@programmingBazi
Copy link
Author

programmingBazi commented Apr 2, 2023

I would expect all 6 of the network keywords are allowed for Godot 3.6/3.5 - Source:

  • remote
  • remotesync
  • puppet
  • puppetsync
  • master
  • mastersync

For Godot 4.0 this changes to 4 network keywords - Source:

  • remote
  • remotesync
  • puppet
  • master

How can I support you with the Issue?

@Scony Scony added this to the 3.x milestone Apr 5, 2023
@Scony
Copy link
Owner

Scony commented Apr 5, 2023

I'm good, I'll try to implement that in the upcoming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatter parser
Projects
Status: No status
Development

No branches or pull requests

2 participants