Page 1 of 1

error loading fuel on transport column

Posted: Wed 11 Mar 2009 8:28 pm
by Grifo_rott
Hi,

I am running another campaign in DCS 3.1.20/MP 4.45 using the Italy map. I am trying to load fuel from a field to a engineer group (axis side) at the L'Aquila airport and I am getting this error:

Code: Select all

Notice: Trying to get property of non-object in /seow/Scripts/MP-FreightLoader.php on line 94

Notice: Trying to get property of non-object in /seow/Scripts/MP-FreightLoader.php on line 95

Fatal error: Call to a member function Close() on a non-object in /seow/Scripts/MP-FreightLoader.php on line 101
Interestingly enough it does not happen at other airfields, just this one. So far I tried with 3 different units (one was was a tanker truck transport column, staff column and this engineer) and they all get the same error at the airport.

I am wondering if it is a setting somewhere that is missing in the database for this particular airport.

The scripts are running on
MySQL version: 5.0.51
PHP Version: 5.2.4

Any help much appreciated :)

Posted: Thu 12 Mar 2009 7:49 am
by IV/JG7_4Shades
Hi Rott,

String quotation error, I expect.

Open MP-FreightLoader.php in a text editor. Go to line 84. You should see something like:

Code: Select all

//Determine the supply resource and individual name.
$ResourceType = substr($LoadGroup,0,strpos($LoadGroup,"_"));
$ResourceName = substr($LoadGroup,strpos($LoadGroup,"_")+1);
Add a string transformation to repeat single quotes (which makes them valid to include in SQL statements):

Code: Select all

//Determine the supply resource and individual name.
$ResourceType = substr($LoadGroup,0,strpos($LoadGroup,"_"));
$ResourceName = substr($LoadGroup,strpos($LoadGroup,"_")+1);
$ResourceName = str_replace("'","''",$ResourceName);
Failing that, edit the Airbases table of your DB and remove the single quote from "L'Aquila Field".

Many thanks for the bug report!

Cheers,
4Shades