#table deepsearch wont return

1 messages · Page 1 of 1 (latest)

foggy quiver
#

#questions message

i already tried returning the function

cold willow
#

well try it again and show the code when it returns the recursive call
because it should work

foggy quiver
#

alr im in bed rn will tell how it goes tommorow

cold willow
#

actually no itll only run the recursive call on the first table in the original one and none of the others which may have the key

#

so youll have to save the result in a variable and return the variable if its not nil

foggy quiver
#

it still prints nil

#

even if i return it

#

@cold willow

#

wait this worked

#

tysm

cold willow
# foggy quiver

make sure to check if the variable is nil rather than whether it exists
cause itll fail when the value is false but not nil

foggy quiver
#

so i just say if a ~= nil then