| Author | Message | 
	
		| Bak ?ls -s
 0 in
 
  
 Age:26
 Gender:
  Joined: Jun 11 2004
 Posts: 1826
 Location: USA
 Offline
 
 | 
			
			  | 
				
					|  Posted: Wed Nov 30, 2005 1:58 am     Post subject: looping through arenas in python |  |   |  |  
				| 
 |  
				| 	| def announce(a):
chat.SendArenaMessage(a, "hello arena!")
 
 for_each_arena(announce)
 | 
 The code above won't work, but if I change it to loop through all players, as below, it works properly:
 
 	| def announce(p):
chat.SendMessage(p, "hello!")
 
 for_each_player(announce)
 | 
 what gives?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Grelminar Creator of Asss
 
 
 Joined: Feb 26 2003
 Posts: 378
 Offline
 
 | 
			
			  | 
				
					|  Posted: Wed Nov 30, 2005 4:14 am     Post subject: |  |   |  |  
				| 
 |  
				| Oooh, that's embarrassing: pymod.c, line 1476, should be "FOR_EACH_ARENA(a)", not "FOR_EACH_PLAYER(a)". |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Bak ?ls -s
 0 in
 
  
 Age:26
 Gender:
  Joined: Jun 11 2004
 Posts: 1826
 Location: USA
 Offline
 
 | 
			
			  | 
				
					|  Posted: Wed Nov 30, 2005 5:46 pm     Post subject: |  |   |  |  
				| 
 |  
				| to recompile pymod, I need the .inc files, which look like they're generated through a python script by the makefile: 
 
 	| 
pymod_mods = pymod
 pymod_libs = $(PYTHON_LDFLAGS)
 
 $(eval $(call dl_template,pymod,maybe_))
 
 ifeq ($(have_python),yes)
 DLS += $(maybe_pymod_DL)
 endif
 
 
 # rule to generate files
 $(call tobuild, py_constants.inc py_callbacks.inc py_interfaces.inc py_types.inc): \
 $(SCRIPTS)/pymod-process.py $(PYMOD_HEADERS)
 $(PYTHON) $(SCRIPTS)/pymod-process.py $(dir $@) $(PYMOD_HEADERS)
 
 # special options for pymod.o
 $(call tobuild, pymod.o): CFLAGS += $(PYTHON_CFLAGS)
 
 # dist: public
 | 
 
 Since I'm using windows, rather than linux, I'd want to run the python script directly. What are the parameters it takes if I want to generate the .inc files? If I give it a directory it will make the files, but I do not think the contents are correct.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Grelminar Creator of Asss
 
 
 Joined: Feb 26 2003
 Posts: 378
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Dec 01, 2005 2:10 am     Post subject: |  |   |  |  
				| 
 |  
				| Why not just use the makefile to build? All this stuff will be taken care of... |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Bak ?ls -s
 0 in
 
  
 Age:26
 Gender:
  Joined: Jun 11 2004
 Posts: 1826
 Location: USA
 Offline
 
 | 
			
			  | 
				
					|  Posted: Tue Dec 06, 2005 12:42 am     Post subject: |  |   |  |  
				| 
 |  
				| what windows program can I use that makes .mk files? |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Grelminar Creator of Asss
 
 
 Joined: Feb 26 2003
 Posts: 378
 Offline
 
 | 
			
			  | 
				
					|  Posted: Tue Dec 06, 2005 3:30 am     Post subject: |  |   |  |  
				| 
 |  
				| Uh, notepad? Whatever you use to edit your source. The ".mk" files are just snippets of Makefile that describe modules. 
 If you're asking what you use to run them, the answer is either mingw (plus msys) or dev-c++ (which includes mingw plus an ide), both of which include a program called "make".
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |