Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] also why does SendWorldMessage send messages twice?

[DiscordArchive] also why does SendWorldMessage send messages twice?

[DiscordArchive] also why does SendWorldMessage send messages twice?

rektbyfaith
Administrator
0
10-15-2023, 10:47 PM
#1
Archived author: Orion • Posted: 2023-10-15T22:47:29.428000+00:00
Original source

also why does SendWorldMessage send messages twice?
rektbyfaith
10-15-2023, 10:47 PM #1

Archived author: Orion • Posted: 2023-10-15T22:47:29.428000+00:00
Original source

also why does SendWorldMessage send messages twice?

rektbyfaith
Administrator
0
10-15-2023, 11:20 PM
#2
Archived author: Honey • Posted: 2023-10-15T23:20:05.196000+00:00
Original source

pasting actual code instead of pictures is always a better idea because people can copy and adjust it more easily.

What i'd do is add this at the top of your function:
```lua
print("OnEnterCombat")
if creature then
print("creature: "..creature:GetName().." has entered combat.")
end
if target then
print("target: "..target:GetName().." has entered combat.")
end
```
That way you can debug the behavior. The print messages will appear in the worldserver console.
rektbyfaith
10-15-2023, 11:20 PM #2

Archived author: Honey • Posted: 2023-10-15T23:20:05.196000+00:00
Original source

pasting actual code instead of pictures is always a better idea because people can copy and adjust it more easily.

What i'd do is add this at the top of your function:
```lua
print("OnEnterCombat")
if creature then
print("creature: "..creature:GetName().." has entered combat.")
end
if target then
print("target: "..target:GetName().." has entered combat.")
end
```
That way you can debug the behavior. The print messages will appear in the worldserver console.

rektbyfaith
Administrator
0
10-15-2023, 11:20 PM
#3
Archived author: Honey • Posted: 2023-10-15T23:20:31.523000+00:00
Original source

As for SendWorldMessage, check if you run 2 scripts. i don't think it displays things twice.
rektbyfaith
10-15-2023, 11:20 PM #3

Archived author: Honey • Posted: 2023-10-15T23:20:31.523000+00:00
Original source

As for SendWorldMessage, check if you run 2 scripts. i don't think it displays things twice.

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