Jump to content

API methods

Pending 1.0.0

MoonDoggy
MoonDoggy

Posted

PlayerEventStates 1.0.0 — API methods can’t be called with a player’s userID

GetEventStatePlayer_API, SetEventStatePlayer_API and PlayerHasRecquiredStates_API all declare ulong playerId. In current Rust, BasePlayer.userID is an EncryptedValue<ulong> struct, not a ulong. A plugin that passes player.userID straight into Call() boxes that struct, so the ulong parameter never binds and the call returns null rather than throwing — the caller just sees false.

Dialogs 1.1.0 does this at :814 and :914. The effect is that every node with Recquired Event States evaluates false and only nodes with no conditions can fire, and Event States Updated writes nothing. It fails completely silently, with no console error.

Fix either end: cast at the call site in Dialogs, or take object in the three API methods and convert?? The second seems to cover every caller.

flutes

Posted

Hey !

Thanks for the detailed report.
The two calls you pointed out are from Dialogs 1.1.0. If that’s the version loaded on your server, please update to Dialogs 1.1.2, which casts the player ID to ulong before both calls.PlayerEventStates 1.0.0 works with this fix and doesn’t need an update for this issue. Its API expects a ulong, so any plugin calling it directly should pass (ulong)player.userID.

If you’re already running Dialogs 1.1.2 and still seeing the issue, could you confirm which plugin is making the failing call?

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3.3m
Total downloads
Customers
12.4k
Customers served
Files Sold
175.6k
Total sales
Payments
3.8m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.