vaporvee / discord-rpc-godot

Discord RPC Plugin for GDScript with an easy-to-use code pattern in Godot Engine 4, with optional Editor Rich Presence! (Compatible with Linux, Windows, & MacOS)
https://docs.vaporvee.com/discord-rpc-godot
MIT License
165 stars 10 forks source link

[Issue/Bug]: Parse error when launching a game with DiscordRPC, even with checks to disable running DiscordRPC in place. #58

Open sourcelocation opened 1 month ago

sourcelocation commented 1 month ago

What happened?

When launching the game on mobile, it crashes while parsing the file where I'm using DiscordRPC, even with checks to avoid running the code on mobile.

Version

1.3.1

Godot Version

4.2.1

Exact steps to reproduce this error

Use DiscordRPC on mobile, but don't run it. You will get this error image

GDScript

func set_up():
    print(OS.get_name()) # prints: Android
    if is_mobile: return
    DiscordRPC.app_id = 1234945200032317602 # Parse Error

Godot output

No suitable library found for GDExtension: res://addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension. Possible feature flags for your platform: mobile, android, etc2, astc, arm64, template, debug, template_debug

Additional information

No response

Checks

vaporvee commented 1 month ago

there is a function to unregister that in GDExtentionManager i think. will send you a solution when I'm at home. on web it doesnt crash never tested it on mobile tbh

sourcelocation commented 1 month ago

Thank you, will be waiting