I have an error when choice script is just saying “Nah, you ain’t gon’ do dat m8”
Code:
*if gender="male" wife, you thought she just left for work early since she does that often.
Error: startup line 173: Invalid expression at char 18, expected no more tokens, found: VAR [wife]
The text that the *if
statement is supposed to display should be on a different line and also indented.
1 Like
In general, “couldn’t extract token” means you’re using a character that isn’t compatible with choicescript code.
Do this:
*if gender="male"
wife, you thought she just left for work early since she does that often.
You need to go to the next line and add another indent after every *if, *elseif and *else.
Szaal
May 11, 2018, 11:47am
6
It seems like you’re still struggling with the basics of CScript.
Welcome to the ChoiceScript Wiki The wiki about ChoiceScript, a simple scripting language developed by Adam Strong-Morse and Dan Fabulich of Choice of Games LLC for writing text-based, multiple-choice games. This Wiki is a ChoiceScript Game...
I already have that wiki up, it’s just that people are much better at explaining things to me.
Maybe you should make a single thread until you’re confident you know all there is in terms of coding for your project.
YeThatFella:
expected no more tokens
That indicates that you’re giving the compiler more tokens (bits of information) than it was expecting. That’s usually due to running lines together, like you did, but can also indicate misplaced parenthesis so that’s a good one to look out for as well.