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

Map gives false error when using a struct as a key instead of a String #33

Closed
NoahShomette opened this issue Apr 23, 2023 · 1 comment · Fixed by #34
Closed

Map gives false error when using a struct as a key instead of a String #33

NoahShomette opened this issue Apr 23, 2023 · 1 comment · Fixed by #34

Comments

@NoahShomette
Copy link

NoahShomette commented Apr 23, 2023

Heres the relevent RON set:

(
 tile_object_stacks: (
    tile_object_stacks:{
       (name:"Units"): (
           current_count: 0,
           max_count: 1
           )
      }
 ), 
)

I get this error from the plugin at the opening ( for the key value (name:"Units")

map key or RONTokenType.} expected, got '('

Despite the error the file does load correctly into my program.

@madwareru
Copy link
Owner

madwareru commented Apr 23, 2023

Yeah it's a known issue, the plugin does not support objects and tupples as keys at the moment.

However, I wouldn't suggest you using of objects as keys, anyway. The fastest solution for the problem is to use strings as keys.

To handle it correctly, which was indeed planned actually, I will need some time, but I just can't find it in a near future

flash-freezing-lava added a commit to flash-freezing-lava/intellij-ron-remix that referenced this issue Jul 26, 2023
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

Successfully merging a pull request may close this issue.

2 participants