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

I do not understand the value "nil" can some please explain?

Asked by 4 years ago

I am confused on the value "nil" because what is the point in scripting something that is nothing?

0
Show us the script. SwePlays08 0 — 4y
0
I dont have any script I just dont understand the value "nil" JessHi0 0 — 4y
0
Oh, but then what is the problem? SwePlays08 0 — 4y
0
It's basically the value doesnt fit in that section. SwePlays08 0 — 4y
View all comments (2 more)
0
I just do not understand why you would put nil in a script because it means nothing? JessHi0 0 — 4y
0
No, a nil is an error. SwePlays08 0 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

"nil" means something doesn't exist or not present. Typically why you get errors called attempt to index nil with 'obj'. You can also set values to be nil as a temporary value.

Ad
Log in to vote
0
Answered by 4 years ago

nil = null, nil = 0 I think these should help.

Answer this question