Pages: [1]   Go Down
  Print  
Author Topic: Openbanter broken  (Read 258 times) Bookmark and Share
Jr. Member
**
Posts: 17
Offline Offline
« on: January 12, 2012, 08:43:52 PM »

I broke the openbanter plugin by trying to create a new command called failshot. Below are two files, the B3 error log and the other is the openbanter.py file that I edited, I can't seem to figure out why this isn't working.

The file name was changed so when I added it to the server I knew which one is the new one.
Logged

Dev. Team
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: COD2,COD4,COD5
Posts: 1098
Offline Offline
« Reply #1 on: January 12, 2012, 08:55:27 PM »

TAB instead of spaces on line 127.

Python is very unforgiving if stuff like this, since it uses indentation to delimit code.

Use of an editor that shows spaces and TABS etc, like Notepad++, will help avoid this
Logged
Jr. Member
**
Posts: 17
Offline Offline
« Reply #2 on: January 12, 2012, 09:08:17 PM »

I added a TAB from the end of the page to put the Try: back in its spot and still didn't work. I got the same error
Logged
Support Hero
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 2x CoD4, 1x BF3
Posts: 2627
Offline Offline
Owner of Host4B3.com - Over 70 bots hosted!
WWW
« Reply #3 on: January 13, 2012, 05:38:41 AM »

Right. The issue is you CANNOT use TAB, instead use 4 spaces!
TAB = BROKEN

My advise: download a new copy, retype your code in, making sure to NEVER use TAB and only use SPACE.
« Last Edit: January 13, 2012, 05:42:37 AM by MordyT » Logged

Need B3 Bot hosting? Check out Host4B3.com
Check Twitter.com/Host4B3 for updates if the site it down.

Help will be given to those with a b3.log

System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
Jr. Member
**
Posts: 17
Offline Offline
« Reply #4 on: January 13, 2012, 07:45:27 AM »

I used spaces before and thats where the error came up. I use TAB and I get the same thing
Logged
Dev. Team
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: COD2,COD4,COD5
Posts: 1098
Offline Offline
« Reply #5 on: January 13, 2012, 07:55:14 AM »

You also need to use the correct number of spaces.
Logged
Jr. Member
**
Posts: 17
Offline Offline
« Reply #6 on: January 13, 2012, 09:13:18 AM »

I got it to work, thanks guys
Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal