Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Attempted to index nil with DName??

Asked by 4 years ago

So I have this UI script for my game that is like city smash. I keep getting this same error and I need help.

Code:

01local Disasters = {
02    Testing = {
03        DName = "Testing Disaster",
04        WhatItDoes = "This is just a test disaster. Nothing really.",
05        Number = 1
06    },
07    Testing2 = {
08        DName = "Testing Disaster 2",
09        WhatItDoes = "This is just another test disaster.",
10        Number = 2
11    },
12}
13 
14local AmountOfDisasters = 2
15 
View all 39 lines...
0
Any moderators on this question, sorry, this was meant for another question. JailBreaker_13 350 — 4y
0
Not really... SharkOwen_dev 69 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

You can't index a table with a set value.

0
Im accepting this because he helped me in the chat :3 SharkOwen_dev 69 — 4y
Ad

Answer this question