Ren'py coding help please.....

Discussion in 'Technology' started by Chie Satonaka, Apr 6, 2013.

  1. Chie Satonaka Twilight Town Denizen

    Joined:
    Oct 10, 2011
    Location:
    Tokyo
    167
    236
    So i'm trying to code a visual novel right now.... . I'm a total beginner in programming so please help....

    I'm doing the text in Japanese and this message keeps showing up when i try starting the game -

    'utf8' codec can't decode byte 0xff in position 0: invalid start byte

    what does it mean and how do i fix it?

    i've followed the instructions on the renpy documentation, but it's not working.... i saved it as a unicode (UTF-8) and also tried putting 'u' in front of the quote as they told me too. still didn't work....

    please help me! >__<''

    I really want to finish this soon!

    if you need any more information, just let me know and i'll post it here.
     
  2. Jayn

    Joined:
    Sep 30, 2007
    4,214
    I recommend you posting this in the actual Renpy forum, if you haven't already. You're more likely to get a response from someone who knows what they're doing and can walk you through it. You can also search for your problem.
     
  3. Chie Satonaka Twilight Town Denizen

    Joined:
    Oct 10, 2011
    Location:
    Tokyo
    167
    236
    I DON'T GET IT......... TT^TT

    even though it's english, i don't understand it.....
     
  4. Plums Wakanda Forever

    Joined:
    Aug 21, 2009
    Gender:
    Male
    Location:
    Konoha
    4,346
    Can you post a screenshot of your code here? Or put it in the code box

    Code:
    [code*]this is a code![/*code]
    (minus the asterisks of course haha)
    under a spoiler tag. I have Renpy downloaded, so I can take a look at it sometime during the day & try to see what's up.
     
  5. Chie Satonaka Twilight Town Denizen

    Joined:
    Oct 10, 2011
    Location:
    Tokyo
    167
    236
    okay thank you plums!

    so this is my code. it's saved as a unicode as some forum posts said to. of course there's only one line cuz i don't want to do a lot before i can make it work.
    Code:
    # You can place the script of your game in this file.
     
    # Declare images below this line, using the image statement.
    # eg. image eileen happy = "eileen_happy.png"
     
    # Declare characters used by this game.
    define h = Character(u'七海 春歌', color="#FFDCDC")
    define c = Character(u'愛島 セシル', color="#21E62E")
    define r = Character(u'黒崎 蘭丸', color="#8E1212")
     
    # The game starts here.
    label start:
     
        r u"何だ?"
        return
    

    this is what shows up when i try running the game.
    Code:
    I'm sorry, but an uncaught exception occurred.
    While parsing [the script (don't want you to see my file names and stuff]
    UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte
    
     
  6. Plums Wakanda Forever

    Joined:
    Aug 21, 2009
    Gender:
    Male
    Location:
    Konoha
    4,346
    Ahhh, got it!

    The "u" you had in the code isn't necessary. It ends up borking with the code (it thought there were commands in places where there weren't).

    Fixed it up for you here:

    Code:
    # You can place the script of your game in this file.
     
    # Declare images below this line, using the image statement.
    # eg. image eileen happy = "eileen_happy.png"
     
    # Declare characters used by this game.
    define h = Character('七海 春歌', color="#FFDCDC")
    define c = Character('愛島 セシル', color="#21E62E")
    define r = Character('黒崎 蘭丸', color="#8E1212")
     
    # The game starts here.
    label start:
     
        r "何だ?"
        return

    The Japanese text isn't showing for some reason when I launch the VN, though that might just be my computer, haha.
     
  7. Chie Satonaka Twilight Town Denizen

    Joined:
    Oct 10, 2011
    Location:
    Tokyo
    167
    236