BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6 support => Topic started by: fowlskins on February 01, 2010, 04:51:40 pm

Title: error loading custom modules
Post by: fowlskins on February 01, 2010, 04:51:40 pm
ive just tryed adding a couple more custom modules
i havnt had a problem before and all of them have worked fine
but now on loading the bebot i get this message


Parse error: syntax error, unexpected $end in C:\bebot\custom\modules\raidweapon
.php on line 1

C:\bebot>pause
Press any key to continue . . .

i get the same message on other modules too ive tryed three different ones
is this something that is occuring because of the server update do i need to update the bebot or something or is it something simple ?
Title: Re: error loading custom modules
Post by: altera on February 01, 2010, 10:51:39 pm
I get this error sometimes too.  Not sure if it is when I cut and paste a module or when I dl a module file, but I have seen it many times.

1.  Make sure the file starts with
<?php
and ends with
?>

2. I Have had to cut offending areas of code out to troubleshoot the issue.  I am not sure if some eol or extra re urn confuses the parser or not.  At the worst of times, I have had to manually retype the whole module out again to fix any issues.  This is all using either notepad or wordpad in Windoze

Maybe someone has a better idea what is going on...
Title: Re: error loading custom modules
Post by: Socaoc on February 02, 2010, 06:47:05 am
I would like to ask for help on the same topic if I may. I am a new user of AoC bebot and I have trouble loading certain custom modules (for example the !bound and !guildinfo modules found elsewhere on this site). The message that I receive is "Parse error : syntax error, unexpected T_VARIABLE in C:\Bebot\custom\modules on line 2" and is the same for all problematic modules.

On the other hand I have no trouble loading other custom modules, such as the social ones found here (!beer, !friends, etc).

Any help would be greatly appreciated  :) !
Thx,
Title: Re: error loading custom modules
Post by: Yite on February 02, 2010, 11:44:49 am
Altera's reply basically covers it already, make sure you copy all the code including the start and end tags.

For the bound module this is how I would copy the module:
* Open the link (http://dump.sjef.biz/aoc/bebot/Bound/Bound.phps) posted in Getrix' post (http://bebot.link/generic-custom-modules/instance-bound-tracker/)
* Select all the text (ctrl-a)
* Copy all the text into the clipboard (ctrl-c)
* Open notepad (your path name indicates windows)
* Paste the copied text into notepad
* Save the files as Bound.php in your C:\Bebot\custom\modules directory
(* Restart your bot)
Title: Re: error loading custom modules
Post by: fowlskins on February 02, 2010, 01:17:21 pm
the modules im getting it on are cut and pasted rather than from a link
but i did cut and paste some before the last game patch and they worked fine

ive checked and they start with <?php and end ?>and still no joy
ill try a downloadable link to see if its something in the copying that its not likeing
Title: Re: error loading custom modules
Post by: fowlskins on February 02, 2010, 01:22:43 pm
ive just loaded the guild items module from the link and the bot loaded up no problems at all so it seems to be disliking anything copyed and pasted from the code on the site for some reason
Title: Re: error loading custom modules
Post by: fowlskins on February 02, 2010, 01:49:41 pm
ok after several attmpts and still no joy i copyed and pasted to  wordpad rather than notepad
and saved as .php
and this time the bot started no problems at all


*edit* well it worked for one and now it wont work from wordpad either seems to be a copying issue of somekind my end maby
Title: Re: error loading custom modules
Post by: Socaoc on February 02, 2010, 05:46:35 pm
Thank you all for your replies  :).

My problematic modules worked in the end after following Yite's method posted above. Seems that wordpad (with its rich text formatting perhaps) was playing tricks with the bot parser, as opposed to notepad that uses plain asci text formating.
Title: Re: error loading custom modules
Post by: ST34LTH on April 04, 2010, 04:07:30 am
Im using notepad and no Customer Modules are working for me, i use select, ctrl c, ctrl v

always gives me a Syntax error in Line 1 for all custom modules,

The ones im trying to use are:

Attribute.php
Autogratz.php
Bound.php
Craft.php
Scripts.php
Gui.php
Yg.php

any help on this would be appreciated

Title: Re: error loading custom modules
Post by: Khalem on April 05, 2010, 10:55:16 am
Simplest fix would likely be using notepad++ for all your editing needs.

http://notepad-plus.sourceforge.net/
SimplePortal 2.3.7 © 2008-2025, SimplePortal