|
| 02 Feb 2014 05:46 AM |
Is there a way to do this using #? I tried:
#_G[questgiver.Name.."Dialog"] and _G[#(questgiver.Name.."Dialog")]
But it gives nil. So I'm not sure how you could do this unless you used a loop. |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 02 Feb 2014 05:54 AM |
Are you sure that the table exists when you attempt to print/whatever its length?
_G.HeyDialog = {1, 2, 3}
questgiver = "Hey" print(#_G[questgiver.."Dialog"]) --> 3 |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2014 06:04 AM |
| Could it be that the script the _G[questgiver.."Dialog"] is in is server-side, while the one I'm calling it with is local? |
|
|
| Report Abuse |
|
|
DataStore
|
  |
| Joined: 07 Feb 2012 |
| Total Posts: 8540 |
|
|
| 02 Feb 2014 06:56 AM |
Yes, that would be the issue. Client-side scripts and server-side scripts have separate global tables.
|
|
|
| Report Abuse |
|
|