From: mcshiz...@hotmail.co.uk
To: tutor@python.org
Subject: Some error that you may find funny but I can't fix.
Date: Sat, 9 Jan 2016 13:17:55 +0000







Hey, I am very new to the ways of python and am currently experiencing this 
error. This program is just a novice project set by my school to create an 
adventure game however I am having issues with being able to set skill points 
(500) to the users desired skills. Here is what I have done and the error it 
gives me in the email.

RE: [Tutor] Some error that you may find funny but I can't fix.Lawrence Lorenzo 
 16:35 To: Steven D'Aprano> Date: Sun, 10 Jan 2016 00:59:18 +1100> From: 
st...@pearwood.info> To: tutor@python.org> CC: mcshiz...@hotmail.co.uk> 
Subject: Re: [Tutor] Some error that you may find funny but I can't fix.> > Hi 
Lawrence, and welcome!> > > On Sat, Jan 09, 2016 at 01:17:55PM +0000, Lawrence 
Lorenzo wrote:> > > > Hey, I am very new to the ways of python and am currently 
experiencing > > this error. This program is just a novice project set by my 
school to > > create an adventure game however I am having issues with being 
able to > > set skill points (500) to the users desired skills. Here is what I 
> > have done and the error it gives me in the email.> > Unfortunately you seem 
to have forgotten to include the code or error. > Assuming your code is not too 
big (say, no more than one or two > hundred lines), please copy and paste both 
the code and the full error > into the body of your email.> > P
 lease make sure you turn off "Rich Text" or HTML mail, as that often > messes 
up the code and makes it really hard to understand.> > Thanks,> > > -- > 
Stevenimport randomimport timeimport math#the player and NPC class.class 
char(object): #character attributes    def __init__(self, name, health, attack, 
rng, magic, speed):        self.name = name        self.health = health        
self.attack = attack        self.speed = rng        self.magic = magic        
self.speed =speedskillpoints = 500print(" You have 500 skill points to spend on 
character development so use them wisely.")print("There are 5 skills ""health, 
attack, range, magic and speed"" which you can decide to spend sillpoints 
on.")print("Each skill has a weakness apart from speed which determines who 
attacks first in a battle and if you can flee.")print("You may want to enforce 
a single ability rather than have multiple weaker abilities.")print("note that 
melee beats range, range beats magic, magic beats melee. If you have 
 the same skill points in 2 skills then you won't have a 
weakness.")time.sleep(1)count = 500while (count) > 0:    name = input("Please 
enter a character name. ")    health = int(input("Enter a number for the 
ammount of points you would like to designate to your characters health. 
Remember you only have 500 and have 5 skills to set. "))        (count) = count 
- health    attack = int(input("Enter a number for the ammount of points you 
would like to designate to your characters attack. You only have ", count, " 
remaining and 4 skills to set. "))        (count) = count - attack    rng = 
int(input("enter a number for the ammount of points you would like to designate 
to your characters range. You only have ", count, " remaining and 3 skills to 
set. "))        (count) = count - rng    magic = int(input("enter a number for 
the ammount of points you would like to designate to your characters magic. You 
only have ", count," remaining and 2 skills to set "))        (count) = count - 
magic    p
 rint ("Your character speed has been set at (", count, ")")        speed = 
(count)    (count) = 0                                                     
print ("" + name + "your health has been set to " (health))print ("" + name + 
"your attack has been set to " (attack))print ("" + name + "your range has been 
set to " (rng))print ("" + name + "your magic has been set to " (magic))print 
("" + name + "your speed has been set to " (speed))player = [()]            
Traceback (most recent call last):  File 
"C:\Users\mcshizney\Desktop\adventuregame.py", line 29, in <module>    attack = 
int(input("Enter a number for the ammount of points you would like to designate 
to your characters attack. You only have ", count, " remaining and 4 skills to 
set. "))TypeError: input expected at most 1 arguments, got 3'Code not done 
obviously however here is the error and code.
                                                                                
  
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to