Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] So does `GetData("i_dont_exist")` return `nil`, `{}` or something else?

[DiscordArchive] So does `GetData("i_dont_exist")` return `nil`, `{}` or something else?

[DiscordArchive] So does `GetData("i_dont_exist")` return `nil`, `{}` or something else?

Pages (3): 1 2 3 Next
rektbyfaith
Administrator
0
05-13-2024, 12:14 PM
#1
Archived author: Michael Crilly • Posted: 2024-05-13T12:14:19.379000+00:00
Original source

So does `GetData("i_dont_exist")` return `nil`, `{}` or something else?
rektbyfaith
05-13-2024, 12:14 PM #1

Archived author: Michael Crilly • Posted: 2024-05-13T12:14:19.379000+00:00
Original source

So does `GetData("i_dont_exist")` return `nil`, `{}` or something else?

rektbyfaith
Administrator
0
05-13-2024, 12:15 PM
#2
Archived author: Foe • Posted: 2024-05-13T12:15:11.446000+00:00
Original source

nil
rektbyfaith
05-13-2024, 12:15 PM #2

Archived author: Foe • Posted: 2024-05-13T12:15:11.446000+00:00
Original source

nil

rektbyfaith
Administrator
0
05-13-2024, 12:15 PM
#3
Archived author: Foe • Posted: 2024-05-13T12:15:47.522000+00:00
Original source

actually no, it returns an empty table
rektbyfaith
05-13-2024, 12:15 PM #3

Archived author: Foe • Posted: 2024-05-13T12:15:47.522000+00:00
Original source

actually no, it returns an empty table

rektbyfaith
Administrator
0
05-13-2024, 12:15 PM
#4
Archived author: Michael Crilly • Posted: 2024-05-13T12:15:59.778000+00:00
Original source

Yes I thought as much.
rektbyfaith
05-13-2024, 12:15 PM #4

Archived author: Michael Crilly • Posted: 2024-05-13T12:15:59.778000+00:00
Original source

Yes I thought as much.

rektbyfaith
Administrator
0
05-13-2024, 12:16 PM
#5
Archived author: Michael Crilly • Posted: 2024-05-13T12:16:24.056000+00:00
Original source

So I'll have to check for that and set it to, in this case, `1` as I want to track a number?
rektbyfaith
05-13-2024, 12:16 PM #5

Archived author: Michael Crilly • Posted: 2024-05-13T12:16:24.056000+00:00
Original source

So I'll have to check for that and set it to, in this case, `1` as I want to track a number?

rektbyfaith
Administrator
0
05-13-2024, 12:17 PM
#6
Archived author: Foe • Posted: 2024-05-13T12:17:03.157000+00:00
Original source

just check the size of the table
rektbyfaith
05-13-2024, 12:17 PM #6

Archived author: Foe • Posted: 2024-05-13T12:17:03.157000+00:00
Original source

just check the size of the table

rektbyfaith
Administrator
0
05-13-2024, 12:17 PM
#7
Archived author: Foe • Posted: 2024-05-13T12:17:24.973000+00:00
Original source

local t = obj:GetData("key")

if #t > 0 then
rektbyfaith
05-13-2024, 12:17 PM #7

Archived author: Foe • Posted: 2024-05-13T12:17:24.973000+00:00
Original source

local t = obj:GetData("key")

if #t > 0 then

rektbyfaith
Administrator
0
05-13-2024, 12:17 PM
#8
Archived author: Michael Crilly • Posted: 2024-05-13T12:17:49.037000+00:00
Original source

I have a quest that requires the player to "collect" cats in the world. When the player clicks on one, I need to track if they've collected `5` cats. I was going to use `player:GetData("quest_40000_cats_collected")` as a way of checking if they've hit `5` cats and is so, set the status of a quest to complete.
rektbyfaith
05-13-2024, 12:17 PM #8

Archived author: Michael Crilly • Posted: 2024-05-13T12:17:49.037000+00:00
Original source

I have a quest that requires the player to "collect" cats in the world. When the player clicks on one, I need to track if they've collected `5` cats. I was going to use `player:GetData("quest_40000_cats_collected")` as a way of checking if they've hit `5` cats and is so, set the status of a quest to complete.

rektbyfaith
Administrator
0
05-13-2024, 12:18 PM
#9
Archived author: Foe • Posted: 2024-05-13T12:18:35.028000+00:00
Original source

that'll break if they log out in the middle of the quest, you should use quest counters instead
rektbyfaith
05-13-2024, 12:18 PM #9

Archived author: Foe • Posted: 2024-05-13T12:18:35.028000+00:00
Original source

that'll break if they log out in the middle of the quest, you should use quest counters instead

rektbyfaith
Administrator
0
05-13-2024, 12:18 PM
#10
Archived author: Foe • Posted: 2024-05-13T12:18:42.233000+00:00
Original source

that way its persistent
rektbyfaith
05-13-2024, 12:18 PM #10

Archived author: Foe • Posted: 2024-05-13T12:18:42.233000+00:00
Original source

that way its persistent

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