#Why am I returning wehn all my if statements are false?

1 messages · Page 1 of 1 (latest)

charred lichen
#
return function(type : nodeTypes, node) : nodeActions
    print(type == "Start")
    print(type == "End")
    print(type == "Response")

    if type == "Start" or "End" or "Response" then 
        print("returning") 
        return {} 
    end
    
    print(functionMaps[type](node))
    return functionMaps[type](node)
end

The printstatements are in the image provided

#

figured it out

thorny violet
#

Are you new or just honest mistake?

charred lichen
#

honest mistake

#

I was 3h into scripting and it was already like 2am 😭

wind parcel
thorny violet
wind parcel
#

maybe just the syntax problem

thorny violet
wind parcel
#

yea ig

#

syntax problem

charred lichen
#

type == "Start" or "End" or "Response" isn't the same as type == "Start" or type == "End" or type == "Response" its not abt syntax but more about logic i guess @wind parcel

wind parcel
#

what

#

i think its the same thing

charred lichen
#

its not

#

Here i guess AI explains it better then I do

wind parcel
#

idk

#

prolly never gonna meet that error again in my life

thorny violet
charred lichen
#

like its not hard to get it