Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] A cordial greeting to all. I am learning to program in Lua and this is my first script and I conside

[DiscordArchive] A cordial greeting to all. I am learning to program in Lua and this is my first script and I conside

[DiscordArchive] A cordial greeting to all. I am learning to program in Lua and this is my first script and I conside

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
03-05-2024, 02:22 PM
#1
Archived author: Danep • Posted: 2024-03-05T14:22:55.677000+00:00
Original source

A cordial greeting to all. I am learning to program in Lua and this is my first script and I consider it to be very basic, the worldserver does not tell me that the script is wrong but for some reason the script does not work for me, could anyone advise me that it is wrong?
[Image: image.png?ex=690c067f&is=690ab4ff&hm=11e...5a23e5a2a&]
rektbyfaith
03-05-2024, 02:22 PM #1

Archived author: Danep • Posted: 2024-03-05T14:22:55.677000+00:00
Original source

A cordial greeting to all. I am learning to program in Lua and this is my first script and I consider it to be very basic, the worldserver does not tell me that the script is wrong but for some reason the script does not work for me, could anyone advise me that it is wrong?
[Image: image.png?ex=690c067f&is=690ab4ff&hm=11e...5a23e5a2a&]

rektbyfaith
Administrator
0
03-05-2024, 02:27 PM
#2
Archived author: Danep • Posted: 2024-03-05T14:27:33.915000+00:00
Original source


[Image: image.png?ex=690c0795&is=690ab615&hm=3a5...49b5d3530&]
rektbyfaith
03-05-2024, 02:27 PM #2

Archived author: Danep • Posted: 2024-03-05T14:27:33.915000+00:00
Original source


[Image: image.png?ex=690c0795&is=690ab615&hm=3a5...49b5d3530&]

rektbyfaith
Administrator
0
03-05-2024, 02:27 PM
#3
Archived author: Honey • Posted: 2024-03-05T14:27:35.790000+00:00
Original source

`item` wont be = 35.
It is an object with multiple properties. I assume you want to check if the item has the entry 35. So you need to check for
```Lua
if item:GetEntry() == 35``` instead.
rektbyfaith
03-05-2024, 02:27 PM #3

Archived author: Honey • Posted: 2024-03-05T14:27:35.790000+00:00
Original source

`item` wont be = 35.
It is an object with multiple properties. I assume you want to check if the item has the entry 35. So you need to check for
```Lua
if item:GetEntry() == 35``` instead.

rektbyfaith
Administrator
0
03-05-2024, 02:29 PM
#4
Archived author: Danep • Posted: 2024-03-05T14:29:55.372000+00:00
Original source

I don't understand why it doesn't work, it should be something very simple.
[Image: image.png?ex=690c0823&is=690ab6a3&hm=6b2...327e49791&]
rektbyfaith
03-05-2024, 02:29 PM #4

Archived author: Danep • Posted: 2024-03-05T14:29:55.372000+00:00
Original source

I don't understand why it doesn't work, it should be something very simple.
[Image: image.png?ex=690c0823&is=690ab6a3&hm=6b2...327e49791&]

rektbyfaith
Administrator
0
03-05-2024, 02:30 PM
#5
Archived author: Danep • Posted: 2024-03-05T14:30:09.551000+00:00
Original source


[Image: image.png?ex=690c0831&is=690ab6b1&hm=95b...71b868276&]
rektbyfaith
03-05-2024, 02:30 PM #5

Archived author: Danep • Posted: 2024-03-05T14:30:09.551000+00:00
Original source


[Image: image.png?ex=690c0831&is=690ab6b1&hm=95b...71b868276&]

rektbyfaith
Administrator
0
03-05-2024, 02:33 PM
#6
Archived author: Foe • Posted: 2024-03-05T14:33:14.876000+00:00
Original source

No such method
rektbyfaith
03-05-2024, 02:33 PM #6

Archived author: Foe • Posted: 2024-03-05T14:33:14.876000+00:00
Original source

No such method

rektbyfaith
Administrator
0
03-05-2024, 02:33 PM
#7
Archived author: Foe • Posted: 2024-03-05T14:33:21.427000+00:00
Original source

Use SendGlobalMessage
rektbyfaith
03-05-2024, 02:33 PM #7

Archived author: Foe • Posted: 2024-03-05T14:33:21.427000+00:00
Original source

Use SendGlobalMessage

rektbyfaith
Administrator
0
03-05-2024, 02:33 PM
#8
Archived author: Foe • Posted: 2024-03-05T14:33:33.552000+00:00
Original source

SendWorldMessage***
rektbyfaith
03-05-2024, 02:33 PM #8

Archived author: Foe • Posted: 2024-03-05T14:33:33.552000+00:00
Original source

SendWorldMessage***

rektbyfaith
Administrator
0
03-05-2024, 02:33 PM
#9
Archived author: Roboto • Posted: 2024-03-05T14:33:40.385000+00:00
Original source

`SendGlobalSysMessage` is a [`ChatHandler`](<https://www.azerothcore.org/pages/eluna/ChatHandler/index.html>) function, not a global function
Also you probably wanted to do `player:AddAura` instead of `Unit:`
rektbyfaith
03-05-2024, 02:33 PM #9

Archived author: Roboto • Posted: 2024-03-05T14:33:40.385000+00:00
Original source

`SendGlobalSysMessage` is a [`ChatHandler`](<https://www.azerothcore.org/pages/eluna/ChatHandler/index.html>) function, not a global function
Also you probably wanted to do `player:AddAura` instead of `Unit:`

rektbyfaith
Administrator
0
03-05-2024, 02:35 PM
#10
Archived author: Danep • Posted: 2024-03-05T14:35:08.861000+00:00
Original source

woo
rektbyfaith
03-05-2024, 02:35 PM #10

Archived author: Danep • Posted: 2024-03-05T14:35:08.861000+00:00
Original source

woo

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)