#RPC Calling a random function

6 messages · Page 1 of 1 (latest)

rough arch
#

Just to be clear, the second script is not calling the RPC, at least not directly. I'm guessing TurnManager.choose_target is inadvertently triggering the RPC, but that's just a guess. You can use CTRL-SHIFT-F to search every script for set_action_points and see which scripts/methods could trigger it.

obsidian citrusBOT
#
Embedding code in discord messages
Inline Code

When you surround some words with single backticks like `this`, it will be formatted as code.

Code Blocks

You can also include code blocks by surrounding the code with three backticks. If you add "swift" then you will also get basic syntax highlighting:
```swift
print("hello world")
```
Discord will then show it as a code block like this:

print("hello world")
Upload

If your code snippet is rather long, you can upload it to a text paste site. One option that supports syntax highlighting for GDScript is https://bpa.st/

meager bobcat
rough arch
#

Nothing? Really? None of your scripts except for the one in your first picture have set_action_points in them? Could set_action_points be triggered by a signal in a scene?

torn heart
#

await is a bad idea in general, but in a multiplayer game? I REALLY recommend against it.

#

This kind of issue is the bread and butter when working with await. Just random stuff resolving unexpectedly and returning to functions at times in which they cannot be handled.