Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] hmm, but in your examples there the classname is nowhere as string, would that matter?

[DiscordArchive] hmm, but in your examples there the classname is nowhere as string, would that matter?

[DiscordArchive] hmm, but in your examples there the classname is nowhere as string, would that matter?

Pages (10): Previous 1 2 3 4 5 10 Next  
rektbyfaith
Administrator
0
05-16-2022, 05:33 PM
#21
Archived author: Grandold • Posted: 2022-05-16T17:33:16.649000+00:00
Original source

hmm not sure if I'm getting it or if we are actually talking about the same thing
rektbyfaith
05-16-2022, 05:33 PM #21

Archived author: Grandold • Posted: 2022-05-16T17:33:16.649000+00:00
Original source

hmm not sure if I'm getting it or if we are actually talking about the same thing

rektbyfaith
Administrator
0
05-16-2022, 05:33 PM
#22
Archived author: Foe • Posted: 2022-05-16T17:33:46.535000+00:00
Original source

That's using a string as a reference to a function in the global namespace and calling it as a function
rektbyfaith
05-16-2022, 05:33 PM #22

Archived author: Foe • Posted: 2022-05-16T17:33:46.535000+00:00
Original source

That's using a string as a reference to a function in the global namespace and calling it as a function

rektbyfaith
Administrator
0
05-16-2022, 05:39 PM
#23
Archived author: Grandold • Posted: 2022-05-16T17:39:00.613000+00:00
Original source

hmm, do you think that my last example of classes A and B should actually call the get() method of classes A and B?
rektbyfaith
05-16-2022, 05:39 PM #23

Archived author: Grandold • Posted: 2022-05-16T17:39:00.613000+00:00
Original source

hmm, do you think that my last example of classes A and B should actually call the get() method of classes A and B?

rektbyfaith
Administrator
0
05-16-2022, 05:39 PM
#24
Archived author: Foe • Posted: 2022-05-16T17:39:28.795000+00:00
Original source

Not without you doing something like _G["A"]():get()
rektbyfaith
05-16-2022, 05:39 PM #24

Archived author: Foe • Posted: 2022-05-16T17:39:28.795000+00:00
Original source

Not without you doing something like _G["A"]():get()

rektbyfaith
Administrator
0
05-16-2022, 05:40 PM
#25
Archived author: Foe • Posted: 2022-05-16T17:40:07.482000+00:00
Original source

```Lua
local classes = {
'A',
'B'
}

for k, v in pairs(classes) do
_G[v]:get()
end```
rektbyfaith
05-16-2022, 05:40 PM #25

Archived author: Foe • Posted: 2022-05-16T17:40:07.482000+00:00
Original source

```Lua
local classes = {
'A',
'B'
}

for k, v in pairs(classes) do
_G[v]:get()
end```

rektbyfaith
Administrator
0
05-16-2022, 05:40 PM
#26
Archived author: Grandold • Posted: 2022-05-16T17:40:14.382000+00:00
Original source

do you mean I would specifically need to use the global scope to that? cos that is what I'm trying to avoid
rektbyfaith
05-16-2022, 05:40 PM #26

Archived author: Grandold • Posted: 2022-05-16T17:40:14.382000+00:00
Original source

do you mean I would specifically need to use the global scope to that? cos that is what I'm trying to avoid

rektbyfaith
Administrator
0
05-16-2022, 05:40 PM
#27
Archived author: Foe • Posted: 2022-05-16T17:40:27.625000+00:00
Original source

Yes, you can't call a local value in a different script
rektbyfaith
05-16-2022, 05:40 PM #27

Archived author: Foe • Posted: 2022-05-16T17:40:27.625000+00:00
Original source

Yes, you can't call a local value in a different script

rektbyfaith
Administrator
0
05-16-2022, 05:40 PM
#28
Archived author: Grandold • Posted: 2022-05-16T17:40:48.513000+00:00
Original source

well even if classes wasnt local
rektbyfaith
05-16-2022, 05:40 PM #28

Archived author: Grandold • Posted: 2022-05-16T17:40:48.513000+00:00
Original source

well even if classes wasnt local

rektbyfaith
Administrator
0
05-16-2022, 05:41 PM
#29
Archived author: Foe • Posted: 2022-05-16T17:41:09.679000+00:00
Original source

If the class isn't local, then it's in the global namespace, unless it's in the same script
rektbyfaith
05-16-2022, 05:41 PM #29

Archived author: Foe • Posted: 2022-05-16T17:41:09.679000+00:00
Original source

If the class isn't local, then it's in the global namespace, unless it's in the same script

rektbyfaith
Administrator
0
05-16-2022, 05:41 PM
#30
Archived author: Grandold • Posted: 2022-05-16T17:41:23.886000+00:00
Original source

then it would just be _G['classes'][v]:get() right?
rektbyfaith
05-16-2022, 05:41 PM #30

Archived author: Grandold • Posted: 2022-05-16T17:41:23.886000+00:00
Original source

then it would just be _G['classes'][v]:get() right?

Pages (10): Previous 1 2 3 4 5 10 Next  
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)