Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Wed Jun 19, 2013 5:56 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Jul 03, 2012 8:34 pm 
Newbie

Joined: Tue Jul 03, 2012 2:39 pm
Posts: 14
I don't understand why this is not working!

Code:
 menu:
        "Gym" if boyx_day2_1_done == False:
            $ boyx_day2_1_done = True
            jump boyx_day2_1
        "Art Room" if boyy_day2_1_done == False:
            $ boyy_day2_1_done = True
            jump boyy_day2_1
        "Computer Lab" if boyz_day2_1_done == False:
            $ boyz_day2_1_done = True
            jump boyz_day2_1
        "Go to Class" if boyx_day2_1_done == True and boyy_day2_1_done == True and boyz_day2_1_done == True:
            a "Ugh, time for more class."
            jump class2b


I keep getting the error: "NameError: name 'boyx_day2_1_done' is not defined"

But I DID define it! Like so:

Code:
    $ boyx_day2_1_done = False
    $ boyy_day2_1_done = False
    $ boyz_day2_1_done = False


Halp :(


Top
 Profile Send private message  
 
PostPosted: Tue Jul 03, 2012 9:02 pm 
Eileen-Class Veteran
User avatar

Joined: Thu Dec 22, 2011 4:26 am
Posts: 1000
Location: United States
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Did you define it at the beginning of your code? (like after "label start:")

When testing it, did you start the game from the beginning again, and not from a save file?

Is your indentation correct?

Is your code exactly as it appears here, or did you have a typo somewhere?

Are there issues with your labels that you have in your menu?

Those are some of the common errors that could be keeping this from working, as the code you provided should work, if implemented properly.

I tested this, and it worked fine:
Code:
label start:
    $ boyx_day2_1_done = False
    $ boyy_day2_1_done = False
    $ boyz_day2_1_done = False
    "Hi!"
label menustart:
    menu:
        "Gym" if boyx_day2_1_done == False:
            $ boyx_day2_1_done = True
            jump menustart
        "Art Room" if boyy_day2_1_done == False:
            $ boyy_day2_1_done = True
            jump menustart
        "Computer Lab" if boyz_day2_1_done == False:
            $ boyz_day2_1_done = True
            jump menustart
        "Go to Class" if boyx_day2_1_done == True and boyy_day2_1_done == True and boyz_day2_1_done == True:
            "Ugh, time for more class."
    return

_________________
Know some awesome people? Want to thank them? Do it here!
For up to date info on my VN projects: HellPanda Studios Blog.
Tsundere VN
My new policy: All my games will have a redhead. Period.

Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.


Top
 Profile Send private message  
 
PostPosted: Tue Jul 03, 2012 9:09 pm 
Newbie

Joined: Tue Jul 03, 2012 2:39 pm
Posts: 14
Haha, thanks! I wasn't starting from the beginning, i was using a saved file. Thank you so much!! I was going crazy trying to figure out why it wasnt working! I had done it earlier in the game, and it worked just fine, so I was utterly lost. THANK YOU SO MUCH!


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group