Drachenfrucht1 / godotcord

A Discord Game SDK integration for Godot
https://drachenfrucht1.github.io/godotcord
MIT License
53 stars 5 forks source link

Added get_connected_peers() function #46

Closed jordi-star closed 3 years ago

jordi-star commented 3 years ago

Closes #30

jordi-star commented 3 years ago

Build fails, any suggestions on what's wrong?

jordi-star commented 3 years ago
modules/libmodules.x11.debug.64.a(godotcord_network_peer.x11.debug.64.o): In function `NetworkedMultiplayerGodotcord::create_lobby(int, bool)::{lambda(discord::Result, discord::Lobby)#1}::operator()(discord::Result, discord::Lobby) const':
/home/runner/work/godotcord/godotcord/modules/godotcord/godotcord_network_peer.cpp:60: undefined reference to `NetworkedMultiplayerGodotcord::_peers'
modules/libmodules.x11.debug.64.a(godotcord_network_peer.x11.debug.64.o): In function `NetworkedMultiplayerGodotcord::join_lobby(long, String)::{lambda(discord::Result, discord::Lobby)#1}::operator()(discord::Result, discord::Lobby) const':
/home/runner/work/godotcord/godotcord/modules/godotcord/godotcord_network_peer.cpp:102: undefined reference to `NetworkedMultiplayerGodotcord::_peers'
modules/libmodules.x11.debug.64.a(godotcord_network_peer.x11.debug.64.o): In function `NetworkedMultiplayerGodotcord::join_lobby_activity(String)::{lambda(discord::Result, discord::Lobby)#1}::operator()(discord::Result, discord::Lobby) const':
/home/runner/work/godotcord/godotcord/modules/godotcord/godotcord_network_peer.cpp:151: undefined reference to `NetworkedMultiplayerGodotcord::_peers'
modules/libmodules.x11.debug.64.a(godotcord_network_peer.x11.debug.64.o): In function `NetworkedMultiplayerGodotcord::_get_peer_by_discord_id(long)':
/home/runner/work/godotcord/godotcord/modules/godotcord/godotcord_network_peer.cpp:286: undefined reference to `NetworkedMultiplayerGodotcord::_peers'
modules/libmodules.x11.debug.64.a(godotcord_network_peer.x11.debug.64.o): In function `NetworkedMultiplayerGodotcord::_get_peer_by_discord_peer_id(unsigned long)':
/home/runner/work/godotcord/godotcord/modules/godotcord/godotcord_network_peer.cpp:296: undefined reference to `NetworkedMultiplayerGodotcord::_peers'
modules/libmodules.x11.debug.64.a(godotcord_network_peer.x11.debug.64.o):/home/runner/work/godotcord/godotcord/modules/godotcord/godotcord_network_peer.cpp:306: more undefined references to `NetworkedMultiplayerGodotcord::_peers' follow
modules/libmodules.x11.debug.64.a(godotcord_network_peer.x11.debug.64.o):(.data.rel.ro._ZTV29NetworkedMultiplayerGodotcord[_ZTV29NetworkedMultiplayerGodotcord]+0x148): undefined reference to `NetworkedMultiplayerGodotcord::get_connected_peers() const'
sairam4123 commented 3 years ago

Ah, you forgot to update something.

sairam4123 commented 3 years ago

Did a refactor? I think that should be an issue.

jordi-star commented 3 years ago

At one point I search and replaced _peers with connected_peers because I thought about renaming the variable and trying to expose it to gdscript, but I quickly realized that wouldn't work so I undid it.

I guess it didn't completely undo.

I'll copy over the new code into a fresh clone

sairam4123 commented 3 years ago

Maybe that's the issue. Better check once again and push back, I'll take a look into the code.

sairam4123 commented 3 years ago

it's failing once again

jordi-star commented 3 years ago

Squashed and ready to merge