xD3vilYT
(astrox)
November 11, 2022, 8:29pm
#1
What do you want to achieve? To prevent these variables from going nil.
What is the issue? These variables are turning nil when they’re not supposed to be.
The variables:
What its returning to me:
What solutions have you tried so far? I have tried to look it on google/youtube or even other devforum posts, but i can’t seem to find a solution.
TestyLike3
(TestyLike3)
November 11, 2022, 8:31pm
#2
Have you tried printing the variables beforehand?
e.g print("random room: "..randomRoom.Name)
TestyLike3
(TestyLike3)
November 11, 2022, 8:35pm
#4
What about room.info
? Show me the whole tree (if it exists)
TestyLike3
(TestyLike3)
November 11, 2022, 10:18pm
#6
It’s nil because, for example, hasStairs
won’t automatically resolve to nil if the key doesn’t exist in the randomRoom
. You should either add the keys to all rooms, or make an if statement that turns hasStairs
to false
if it’s nil
.
system
(system)
Closed
November 25, 2022, 10:18pm
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.