Results 1 to 4 of 4

Thread: Selfmade B3 command not working

  1. #1
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts

    Selfmade B3 command not working

    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:
    PHP Code:
        def cmd_flames(selfdataclientcmd=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
    Last edited by EvoloZz; 22nd February 2013 at 10:57.

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    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?1...-B3!%29&p=4409
    timescale 0.01

  3. The Following User Says Thank You to kung foo man For This Useful Post:

    EvoloZz (23rd February 2013)

  4. #3
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    I will try it, but i want to finish what i started with my current work

  5. #4
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    Thanks that fixed my problem, I used tabs everywhere

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •