#If statement error

17 messages · Page 1 of 1 (latest)

noble oasis
#

upload your code to a bin so i can try seeing it better

light wharf
#

You didn’t close your else if??

round oxide
#

don't use , there

#

use ;

light wharf
#

You closed the permSchema.create

#

Unless you’re big on nesting cringe

round oxide
#

why are there so many , a_mio_blech

#

else if (!Data)

#

that isn't exactly the direct issue, you could close it after, which would make it show as "closed"

#

the main issue is you're using , to separate what should be statements, but the , makes them expressions

#

if is not a valid expression, it can only be a statement

#

you should be using ; to separate statements

round oxide
#

it's probably in the wrong if

#

as stated above, (!Data) wasn't closed above it

#

it's under an else if with the above being data || Data, so inside !Data, data || Data must be false, since neither is reassigned

round oxide
#

firgure out the right logic trees you have to write then

#

fix your indents too, it'll make the entire thing easier to visualize