Forums WoW Modding Support Archives WoWModding Threads [DiscordArchive] Hello! I am having an issue with AIO.Handle, i...

[DiscordArchive] Hello! I am having an issue with AIO.Handle, i...

[DiscordArchive] Hello! I am having an issue with AIO.Handle, i...

rektbyfaith
Administrator
0
07-20-2025, 05:32 PM
#1
Archived author: Needle • Posted: 2025-07-20T17:32:51.991000+00:00
Original source

rektbyfaith
07-20-2025, 05:32 PM #1

Archived author: Needle • Posted: 2025-07-20T17:32:51.991000+00:00
Original source

rektbyfaith
Administrator
0
07-20-2025, 05:32 PM
#2
Archived author: Needle • Posted: 2025-07-20T17:32:54.007000+00:00
Original source

Thread automatically created by Kaisa in <#415944535718494208>
rektbyfaith
07-20-2025, 05:32 PM #2

Archived author: Needle • Posted: 2025-07-20T17:32:54.007000+00:00
Original source

Thread automatically created by Kaisa in <#415944535718494208>

rektbyfaith
Administrator
0
07-20-2025, 05:40 PM
#3
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?
rektbyfaith
07-20-2025, 05:40 PM #3

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?

rektbyfaith
Administrator
0
07-20-2025, 05:47 PM
#4
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
```
rektbyfaith
07-20-2025, 05:47 PM #4

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
```

rektbyfaith
Administrator
0
07-20-2025, 05:51 PM
#5
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)
rektbyfaith
07-20-2025, 05:51 PM #5

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)

rektbyfaith
Administrator
0
07-20-2025, 05:53 PM
#6
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
rektbyfaith
07-20-2025, 05:53 PM #6

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

rektbyfaith
Administrator
0
07-20-2025, 05:55 PM
#7
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
rektbyfaith
07-20-2025, 05:55 PM #7

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

rektbyfaith
Administrator
0
07-20-2025, 05:58 PM
#8
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
rektbyfaith
07-20-2025, 05:58 PM #8

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

rektbyfaith
Administrator
0
07-20-2025, 06:13 PM
#9
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(&quot;AIOExample&quot;, &quot;print&quotWink 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
rektbyfaith
07-20-2025, 06:13 PM #9

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(&quot;AIOExample&quot;, &quot;print&quotWink 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

rektbyfaith
Administrator
0
07-20-2025, 06:14 PM
#10
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.
rektbyfaith
07-20-2025, 06:14 PM #10

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.

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)