You&#39;re using a global variable (playHP) in a function, but you haven&#39;t told the function that playHP is supposed to be a global variable.<div>You&#39;re going to want to change your function definition to:</div><div>
<br></div><div><span class="Apple-style-span" style="font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 11px; color: rgb(51, 51, 51); "><span class="kw1" style="color: rgb(255, 119, 0); font-weight: bold; ">def</span> monsAttk <span class="br0" style="color: rgb(102, 204, 102); ">(</span>damage, attack<span class="br0" style="color: rgb(102, 204, 102); ">)</span>: <span class="co1" style="color: rgb(128, 128, 128); font-style: italic; ">#A monsters attack  </span></span></div>
<div><font class="Apple-style-span" color="#808080" face="&#39;Courier New&#39;, Courier, monospace" size="3"><span class="Apple-style-span" style="font-size: 11px;"><i>    global playHP</i></span></font></div><div><font class="Apple-style-span" color="#808080" face="&#39;Courier New&#39;, Courier, monospace" size="3"><span class="Apple-style-span" style="font-size: 11px;"><i><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial; font-size: small; font-style: normal; "><br>
<br><div class="gmail_quote">On Wed, Sep 30, 2009 at 9:13 PM, bob gailer <span dir="ltr">&lt;<a href="mailto:bgailer@gmail.com">bgailer@gmail.com</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Something is screwy.<br>def monsAttk (damage, attack,playHp): # function expects 3 arguments<br>monsAttk(4, 15) # passes 2 arguments<br><br>That should raise TypeError: monsAttk() takes exactly 3 argument (2 given)<br>So something else is awry.</blockquote>
</div></span></i></span></font></div><div><font class="Apple-style-span" face="&#39;Courier New&#39;, Courier, monospace" size="3"><span class="Apple-style-span" style="font-size: 11px;">That&#39;s because Corey originally e-mailed code that he had already modified rather than the code that was generating the error.  The pastebin code is different.</span></font></div>
<div><font class="Apple-style-span" face="&#39;Courier New&#39;, Courier, monospace" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div><font class="Apple-style-span" face="&#39;Courier New&#39;, Courier, monospace" size="3"><span class="Apple-style-span" style="font-size: 11px;">Corey, I&#39;m not trying to be an ass, but you&#39;re making it difficult for us to help you and thus we&#39;re less inclined to.</span></font></div>
<div><br><div class="gmail_quote">On Wed, Sep 30, 2009 at 9:00 PM, Corey Richardson <span dir="ltr">&lt;<a href="mailto:kb1pkl@aim.com">kb1pkl@aim.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



  
  

<div bgcolor="#ffffff" text="#000000">
Luke Paireepinart wrote:
<blockquote type="cite"><div class="im">If your code&#39;s more than 10 lines long or so,  put it on <a href="http://pastebin.com" target="_blank">pastebin.com</a> and
send us the link rather than inlining the whole thing.  You could also
send it as an attachment.
  </div><div><div class="im">Your formatting is all screwed up and I can&#39;t read the code at
all, but I have an idea about your error.<br>
  </div><div><br>
  <div class="gmail_quote">Hmmm...thats odd. I didn&#39;t do anything
different....but I can do that.<a href="http://pastebin.com/m518f612f" target="_blank">http://pastebin.com/m518f612f</a> <br>
  </div>
  </div>
  </div>
</blockquote>
<br>
<blockquote type="cite">
  <div>
  <div>
  <div class="gmail_quote">
  <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank"></a><br>
    <br>
  </blockquote>
  </div>
  <br>
  </div>
  </div>
</blockquote>
<br>
</div>

</blockquote></div><br></div>