Weird error, really can't spot whats wrong


#1

Okay, so I was playing through my game when I came across this error:

line 606: Non-existent command ‘selectable_if’

I’m pretty sure that this line is perfectly correct, for one.

*selectable_if (slept_in_late_first_day = “true”) #You dash straight towards the Assembly Plaza. Forget about breakfast, the exam is more important!

The worst part of it all is that sometimes I get this error for this line, and sometimes I don’t. It’s really confusing me.:confused:


#2

I just realised that I accidentally created the same thread twice. Oops. Sorry. ^:)^
Could somebody delete this one?
^:)^


#3

you have quit “”


*selectable_if (bu) #you don't need write true at all

or


\*selectable_if (bu =true) #but I just skip true

#4

Take out the =“true”


#5

*selectable_if (slept_in_late_first_day =true) #You dash straight towards the Assembly Plaza. Forget about breakfast, the exam is more important!

was this what you wanted me to change it to?

:expressionless: it still doesn’t work though :(((

Edit : I changed everything to *selectable_if (slept_in_late_first_day =true) or (slept_in_late_first_day =false) if it was previously (slept_in_late_first_day =“true”) or
(slept_in_late_first_day =“false”), and I get the same error.


#6

Change it to


*selectable_if (slept_in_late_first_day)

And make sure you’ve created that variable with *create in startup.txt
I’d also recommend shortening it to something like (slept_late)


#7

What if slept_in_late_first_day is false? What would I change it to? Sorry, really new to choicescript here :frowning:


#8

That’s okay. If it’s false, the choice won’t be available.


#9

First read tutorials and wiki i would write a small example

In startup.txt

*title Demo
*create sleep_soon false
*create sleep_late false
Tomorrow you will start your last day in highschool .
So you decide
*fake_choice
----#Sleep soon
--------*set sleep_soon true
----#I wanna watch tv until midnight
--------*set sleep_late true
*If sleep_late
----you wake up late
----*goto run
*else
----You wake up
----*goto breakfast


#10

Thank you both for your help! :slight_smile: It’s fixed now:)


#11

Great:) you’re welcome.