samsface / godot-discord-game-sdk

42 stars 4 forks source link

Cannot create new class #10

Open Wolfyxon opened 2 years ago

Wolfyxon commented 2 years ago

I'm getting Attempt to call function 'new' in base 'NativeScript' on a null instance. every time I want to create a class. Example DiscordActivity.new()

Tried example project, same result

Wolfyxon commented 2 years ago

image It cannot find the library... No such file or directory

samsface commented 2 years ago

Did you copy the discord sdk into the plugin dir? Can show me the output of this command:

ls (whereever you put the project)/addons/discord_game_sdk/

Wolfyxon commented 2 years ago

Of course I did. I also checked the paths in the library, everything is ok

DerSchlaueFrosch commented 2 years ago

I have the same issue

samsface commented 2 years ago

Of course I did. I also checked the paths in the library, everything is ok

Ok cool but can you show me the contents of addons/discord_game_sdk directory as seen from your file viewer(not godot).

samsface commented 2 years ago

@DerSchlaueFrosch Had some time to look at this issue. I think the problem is the discord sdk has renamed a file since I created this plugin. Try renaming the file like so:

-res://discord_game_sdk/addons/discord_game_sdk.so
+res://discord_game_sdk/addons/libdiscord_game_sdk.so