
-----------------------------------
matt4521
Tue Sep 18, 2012 9:35 am

School Alpha Program *NEED HELP*
-----------------------------------
Me and my partner have been working on this error for hours.... when calling the allsprites update function it gives us a argument error. If someone could point us in the right direction or even just boldly tell us where we are going wrong that will greatly be appreciated!!


*********************************************************************
Traceback (most recent call last):
  File "F:\Alpha\alpha program.py", line 137, in 
    allsprites.update()
  File "C:\Python32\lib\site-packages\pygame\sprite.py", line 462, in update
    s.update(*args)
TypeError: update() takes exactly 2 arguments (1 given)

import pygame,sys,os, time
from pygame.locals import *
*********************************************************************






def initPygame():
	pygame.init()#initailizes pygame
	
	os.environ

Mod Edit:

Pleas wrap you code in either of the following in order to preserve whitespace to highlight the syntax.
 ... code ... 

[code] ... code ... [/code ]
[/code]

-----------------------------------
Zren
Wed Sep 19, 2012 8:12 pm

Re: School Alpha Program *NEED HELP*
-----------------------------------
I'm going to guess that pygame.sprite.RenderPlain is a sprite group. 
http://www.pygame.org/docs/ref/sprite.html#Group.update

I'm also going to guess that redcircle.update(, which requires 2 arguments (self, move) are not being supplied when you call allsprites.update(). Suggestion: your input section shouldn't call update() but instead a new method called move(x, y) which will call whatever movement code. You can improve on this design a velocity variable. Improve on that with acceleration, and so on until you've a amateur physics engine.

-----------------------------------
matt4521
Thu Sep 20, 2012 9:47 am

Re: School Alpha Program *NEED HELP*
-----------------------------------
OK so we have made a few changes and things have started to work... but now were attempting to print Text to the screen and we can't seem to get it working.... this is our updated code to date...



import pygame,sys,os, time
from pygame.locals import *






def initPygame():
	pygame.init()#initailizes pygame
	
	os.environ

-----------------------------------
Zren
Thu Sep 20, 2012 7:41 pm

RE:School Alpha Program *NEED HELP*
-----------------------------------
Traceback				
    	C:\Users\Admin\Desktop\New folder (3)\module1.py	168		
    update	C:\Users\Admin\Desktop\New folder (3)\module1.py	59		
AttributeError: 'tuple' object has no attribute 'get_rect'				

Error on this line: text = pygame.font.render = ("Collision:", self.collide)

There's also another error here.

        def __init__(self): 
                pygame.font.init() 
                return None 
                
                self.font = pygame.font.Font(None,36) 
                self.collide = False 


There's also another error after that... Seriously... =.='
