Page 1 of 1

Motorcycle Engine

Posted: Sun Jul 11, 2004 5:30 pm
by Bowser
I built the Bike Frame, Built the two wheels, then assembled the bike. I hopped on to take it for a test drive, but there was no engine.

I selected the "Build or Manufacture Something" button.
I clicked the Engine button.
I selected Motorcycle Engine.
I read the building information.

I then clicked the "select this object to build" arrow button and got this message:

Fatal error: Call to undefined function: eplode() in /home/cantr/public_html/action.build.inc.php on line 145

I backed out of it and checked activities and my request was not processed.

Posted: Sun Jul 11, 2004 5:57 pm
by creepyguyinblack
Myself and Anthony have taken a look at all the entries and can find no problems with them so we will have to wait and see if Thomas or Jos can find the problem.

Posted: Sun Jul 11, 2004 6:21 pm
by Junesun
Would this be a typo of "explode"?
Context in that script: $rules = eplode (';', $loc_objecttype_info->rules);

Posted: Sun Jul 11, 2004 9:06 pm
by Bowser
I copy/pasted the error, so the message in my post is exactly as it appeared on the screen.

Posted: Sun Jul 11, 2004 9:19 pm
by Anthony Roberts
I think June was commenting that it was spelt wrong in the code itself, not what your post said.

$rules = eplode (';', $loc_objecttype_info->rules);

But I don't think it is. Because, there are three other engines. Do they use the same code? So then, why don't they cause an error?

Posted: Sun Jul 11, 2004 9:54 pm
by Thomas Pickert
Junesun's analysis pointed right to the problem. I have fixed it now.

The explanation for Anthony's objection is, that it is a relatively recent change to use explode instead of preg_split, because it's a little less expensive. The other 3 engines have probably been built before that.

Anyway, it should be possible to build that engine now.

Posted: Mon Jul 12, 2004 12:05 am
by Bowser
All is good now and soon the first biker gang will be roaming Cantr.

Posted: Mon Jul 12, 2004 4:22 am
by west
Olip's Angels