godot-gdscript-toolkit
godot-gdscript-toolkit copied to clipboard
Keyword 'remotesync' in combination with variables break gdformat
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!
I think there was something similar reported before - can you check if your game stops working if you remove remote/remotesync keywords from variables?
If i remove the keyword i can't change the variable with the rset mechanism anymore.
e.g.: rset("foo", 20)
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?
I would expect all 6 of the network keywords are allowed for Godot 3.6/3.5 - Source:
remoteremotesyncpuppetpuppetsyncmastermastersync
For Godot 4.0 this changes to 4 network keywords - Source:
remoteremotesyncpuppetmaster
How can I support you with the Issue?
I'm good, I'll try to implement that in the upcoming weeks.