PDA

View Full Version : Selfmade B3 command not working



EvoloZz
22nd February 2013, 11:54
I have tried to write a b3 command for function I got in my mod but it doesnt seem to work... B3 doesnt turn on anymore after including my plugin with it.
Here's the command:

def cmd_flames(self, data, client, cmd=None):
"""\
<player> - Give flames to a player
"""

input = self._adminPlugin.parseUserCmd(data)
if not input:
client.message('^7Invalid parameters, you must supply a player name')
return False

else:
sclient = self._adminPlugin.findClientPrompt(input[0], client)
if sclient:
self.console.setCvar('flames', '%s' % sclient.cid)
return True

The "flames" command works perfectly thru console, so the problem is in that command and i can't seem to find it... There might be just bad syntax somewhere but i never use python so i don't know the rules...
I just wrote that with my crappy experience with B3, so please help me

kung foo man
22nd February 2013, 18:04
Hm, the syntax looks ok, but maybe you mixed tabs with spaces (Python is sensitive to that, urg...)

The new extension is perfect for builtin-commands: http://killtube.org/showthread.php?1201-Extension-Player-Command-Control-%28includes-CHAT-Control-for-Builtin-B3!%29&p=4409

EvoloZz
22nd February 2013, 18:07
I will try it, but i want to finish what i started with my current work :D

EvoloZz
23rd February 2013, 14:34
Thanks that fixed my problem, I used tabs everywhere :D