expected statement error help me!

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
pk space jam
Newbie
Posts: 22
Joined: Mon Nov 18, 2013 2:46 am
Contact:

expected statement error help me!

#1 Post by pk space jam »

What have i screwed up here? syntax?

Code: Select all

menu battle_choices:

  'What will you do?':
         
    if psi_flag == False:
      'Attack':
        python:
          attack_roll = rolld100()
          if attack_roll <= weapon_skill:
              damage = roll3d6()
              monster_stats[enemy[1]] -= damage
              return
          else:
              return renpy.label.enemy_attacls_party
        '%s is hit for %d!' % (enemy, damage)
        python:
          if monster_stats[enemy[1]] <= 0:
              return label victory
          else:
              return renpy.label.enemy_attacks_party
              
      'Defense':
       ####code here
         
       'Items':
       ####code here

       if run_flag == True:
         'Run':
         ####code here

       else:
         return
  else:  
    'Attack':
    ####code here

    'Psi':
    ####code here

    'Defense':
    ####code here
           
    'Items':
    ####code here

    if run_flag == True:
      'Run':
      ####code here
    else:
      return

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: expected statement error help me!

#2 Post by Alex »

What is the line that causes this error?
Why using python blocks and all that "return"s?
Also, this might be better to apply condition checking to individual menu choices, like

Code: Select all

menu:
    "Chpoice 1" if flag1     # will be shawn if flag1 value is True
    "Chpoice 2"                 # will always be shawn
http://www.renpy.org/doc/html/menus.html

Post Reply

Who is online

Users browsing this forum: Google [Bot]