Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here
NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

You are here: Big Brother Bot ForumAdd-OnsPlugins Discussion (Moderator: MordyT)Own Plugin for Set Time Call of Duty 2
Pages: [1]   Go Down
  Print  
Author Topic: Own Plugin for Set Time Call of Duty 2  (Read 1101 times) Bookmark and Share
Newbie
*
Posts: 2
Offline Offline
« on: January 01, 2010, 06:46:42 AM »

Hello !!
i have a Problem with my own Plugin!! i got this error (B3 is running under Windows Vista)
Code:
100101 15:28:06 CRITICAL Error loading plugin: unexpected indent (poweradmin.py, line 171)
Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\b3\parser.py", line 437, in loadPlugins
    pluginModule = self.pluginImport(p)
  File "C:\Python26\lib\site-packages\b3\parser.py", line 493, in pluginImport
    mod = __import__(module)
  File "C:\Python26\lib\site-packages\b3\plugins\poweradmin.py", line 171
     def cmd_palimit(self, data, client, cmd=None):
    ^
 IndentationError: unexpected indent

And this is my Plugin Function!
Code:
 def cmd_timelimit(self, data, client, cmd=None):
    """\
    <message> - Set the Time of the Game to a Value
    """
    if not data:
      client.message('^7Invalid or missing data, try !help timelimit')
      return False
    else:
      # are we still here? Let's write it to console
      self.console.setCvar( 'b3_time','%s' % data )

    return True

And This is my serverside mod!
Code:
_b3_time()
{
time  = getcvar("b3_time");
setcvar("b3_time", "");
iprintlnbold("Time was edited by an admin");
setcvar("scr_zom_timelimit", time);
}

Please i need some help!!
« Last Edit: January 01, 2010, 06:48:14 AM by paddif » Logged

[ www.xlrstats.com ]
Project Lead
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD, CoD2, CoD5, UrT
Posts: 2022
Offline Offline
WWW
Support Specialty: B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
« Reply #1 on: January 01, 2010, 07:26:30 AM »

Your indentation of the first line is wrong in your plugin function. Indentation is critical in python.
Logged

Newbie
*
Posts: 2
Offline Offline
« Reply #2 on: January 01, 2010, 07:30:56 AM »

Thank you but now i have an other problem witrh Voteplugin!! i dont know the name to use the plugin!!
i tried this!
Code:
<plugin name="votekick" priority="18" config="@b3/conf/voting.xml"/>
but it says No Plugin found with name votekick!!
Logged
Tags: Timelimit limit Call of Duty 2 
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal