Server Help

ASSS Questions - looping through arenas in python

Bak - Wed Nov 30, 2005 1:58 am
Post subject: looping through arenas in python
Code: Show/Hide
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:
Code: Show/Hide
def announce(p):
    chat.SendMessage(p, "hello!")

for_each_player(announce)

what gives?
Grelminar - 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)".
Bak - 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:

Code: Show/Hide

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.
Grelminar - 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...
Bak - Tue Dec 06, 2005 12:42 am
Post subject:
what windows program can I use that makes .mk files?
Grelminar - 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".
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group