[DiscordArchive] Hello! I am having an issue with AIO.Handle, i...
[DiscordArchive] Hello! I am having an issue with AIO.Handle, i...
Archived author: Needle • Posted: 2025-07-20T17:32:51.991000+00:00
Original source
Archived author: Needle • Posted: 2025-07-20T17:32:54.007000+00:00
Original source
Thread automatically created by Kaisa in <#415944535718494208>
Archived author: Kaev • Posted: 2025-07-20T17:40:28.846000+00:00
Original source
any chance you're using the multistate eluna and it triggers twice because no map state check? or serverside code does not have the AIO server check at the top?
Archived author: Fero • Posted: 2025-07-20T17:47:58.838000+00:00
Original source
Thanks for the answer!
Any chance you could elaborate on the multistate eluna?
I've tried wrapping my handler
```
if not _G.EngravingHandlersRegistered then
_G.EngravingHandlersRegistered = true
print("[Engraving] Registering AIO Handlers")
AIO.AddHandlers("Engraving", {
HandleEngraveRequest = function(player, itemId)
print("hello from server")
end
})
end
```
Archived author: Kaev • Posted: 2025-07-20T17:51:03.149000+00:00
Original source
Do you have this at the top of your serverside script?
```lua
local AIO = AIO or require("AIO")
if not AIO.IsMainState() then
return
end
```
(i think if you're using a non-multistate version like the AC eluna it's AIO.IsServer instead)
Archived author: Fero • Posted: 2025-07-20T17:53:57.040000+00:00
Original source
I tried to add the IsServer() check, but it's still triggering twice
Archived author: Kaev • Posted: 2025-07-20T17:55:22.739000+00:00
Original source
are you sure that the clientside code does not send it twice? can only guess without seeing actual code
Archived author: Fero • Posted: 2025-07-20T17:58:35.879000+00:00
Original source
```
frame.EngraveButton:SetScript("OnClick", function()
print("Client Engrave button clicked")
if EngravingFrame.itemGuid then
AIO.Handle("Engraving", "HandleEngraveRequest", EngravingFrame.itemGuid)
else
print("Missing item data.")
end
end)
```
the print is only printed once
from a client event handler my print function on the server side got called twice. But the client side event handler only got...Archived author: Fero • Posted: 2025-07-20T18:13:59.124000+00:00
Original source
Aha, i found the issue
https://github.com/azerothcore/mod-eluna/issues/193
[Embed: AIO Handle executes twice · Issue #193 · azerothcore/mod-eluna]
Whenever i called AIO.Handle("AIOExample", "print"
from a client event handler my print function on the server side got called twice. But the client side event handler only got...
https://github.com/azerothcore/mod-eluna/issues/193
Archived author: Needle • Posted: 2025-07-20T18:14:02.420000+00:00
Original source
Thread was archived by Kaisa. Anyone can send a message to unarchive it.