collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: error loading custom modules  (Read 2894 times)

0 Members and 1 Guest are viewing this topic.

Offline fowlskins

  • BeBot User
  • **
  • Posts: 33
  • Karma: +0/-0
error loading custom modules
« 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 ?

Offline altera

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: error loading custom modules
« Reply #1 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...

Offline Socaoc

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: error loading custom modules
« Reply #2 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,
« Last Edit: February 02, 2010, 07:57:54 am by Socaoc »

Offline Yite

  • BeBot Apprentice
  • ***
  • Posts: 152
  • Karma: +0/-0
    • Niflheim - Crom
Re: error loading custom modules
« Reply #3 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 posted in Getrix' post
* 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)
-Yite [Crom]

Offline fowlskins

  • BeBot User
  • **
  • Posts: 33
  • Karma: +0/-0
Re: error loading custom modules
« Reply #4 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

Offline fowlskins

  • BeBot User
  • **
  • Posts: 33
  • Karma: +0/-0
Re: error loading custom modules
« Reply #5 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

Offline fowlskins

  • BeBot User
  • **
  • Posts: 33
  • Karma: +0/-0
Re: error loading custom modules
« Reply #6 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
« Last Edit: February 02, 2010, 02:16:59 pm by fowlskins »

Offline Socaoc

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: error loading custom modules
« Reply #7 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.

Offline ST34LTH

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: error loading custom modules
« Reply #8 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


Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: error loading custom modules
« Reply #9 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/
BeBot Founder and Fixer Kingpin

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 305
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal