invalid Sytaxis Error got me perplexed

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
neometalero
Regular
Posts: 198
Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:

invalid Sytaxis Error got me perplexed

#1 Post by neometalero »

I have this code

Code: Select all

label Duelo4MonstruosGen01:
    "configuracion 01"
    $ 4MonsConfig01=True
    $ 4MonsConfig02=False
    $ 4MonsConfig03=False

    jump Duelo4MonstruosGen

label Duelo4MonstruosGen02:
    "configuracion 01"
    $ 4MonsConfig01=False
    $ 4MonsConfig02=True
    $ 4MonsConfig03=False

    jump Duelo4MonstruosGen

label Duelo4MonstruosGen03:
    "configuracion 01"
    $ 4MonsConfig01=False
    $ 4MonsConfig02=False
    $ 4MonsConfig03=True

    jump Duelo4MonstruosGen
and it's getting the invalidSytaxis error
Image
I cant get my hands on what is wrong with it.
Any idea?
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: invalid Sytaxis Error got me perplexed

#2 Post by Remix »

You cannot start python variable names with a numeric
Frameworks & Scriptlets:

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: invalid Sytaxis Error got me perplexed

#3 Post by Imperf3kt »

You might also want to use the "default" statement to declare your variables outside any label, instead of python $ within. It will save you many headaches in the future.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
neometalero
Regular
Posts: 198
Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:

Re: invalid Sytaxis Error got me perplexed

#4 Post by neometalero »

Imperf3kt wrote: Tue Jan 08, 2019 11:28 pm You might also want to use the "default" statement to declare your variables outside any label, instead of python $ within. It will save you many headaches in the future.
Tks I was declearing it like that

Code: Select all

default MonsConfig403 = False
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

User avatar
neometalero
Regular
Posts: 198
Joined: Sun Oct 23, 2016 3:51 am
Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
Deviantart: neometalero
Contact:

Re: invalid Sytaxis Error got me perplexed

#5 Post by neometalero »

Remix wrote: Tue Jan 08, 2019 9:42 pm You cannot start python variable names with a numeric
Tks a lot! that was the problem, I had no idea. I changed it to

Code: Select all

default MonsConfig403 = False #2 condon
And that fixed it.
Working on many weird narrative games at Curse Box Studios
Image
https://www.curseboxstudios.com/

Post Reply

Who is online

Users browsing this forum: Google [Bot], henne