This project has moved. For the latest updates, please go here.

How do i call these functions without an error?

Nov 3, 2014 at 11:04 AM
Hi, I'm confused on how to call these functions I'm continuously getting error can you please help me.

I am also unsure on how parameters work and don't know what I need to write in them, i'm a bit of noob so will need you to explain thoroughly thank you

I am trying to get a dice roll and then the player chooses which counter to move, the program will then automatically minus the movement from the counters position

counter = ()
postiony_red1 = 605
postiony_red2 = 605

def dice_roll():
 import random
 dice = random.randint(1, 4)
 print("You rolled a", dice)
 if dice == 1 :
     print("You can step forward", dice, "move")
 elif dice == 2 or dice == 3:
     print("You can move", dice, "steps forward")
     print("You can move 1 space back")
 input("Press return")
 return dice
def move(dice):
 if dice == 1:
     move = -60
 elif dice == 2:
     move = -120
 elif dice == 3:
     move = -180
 elif dice == 4:
     move = 60
 return move
def ask_player():
 while counter != ("counter 1") or ("counter 2"):
     counter = input("Do you wish to move counter 1 or counter 2?")
     return counter
def counter_postion():
 if counter == ("counter 1"):
     move += postiony_red1
     print("total move is", move)
 elif counter == ("counter 2"):
     move += postiony_red2
     print("total move is", move)
Nov 10, 2014 at 8:57 AM