Problem confirming if bids removed?

im writing a standalone script to work with phpvms, currently im trying to get it to return an error message if a bid can’t be removed, but for some reason its not working correctly:

if(SchedulesData::removeBid($bidid))
{
	echo "Bid Succesfully Removed";
}
else
{
	echo '<font color="red">Failed to Remove Bid, Error Code: RB001</font>';
}

The problem im having is that its returning the error message when the bid is removed or when its not, where as i use a identical check when adding bids:

if(SchedulesData::addBid($pilotid, $brief_id))
{
	echo "Bid Added!";
}
else
{
	echo '<center><font Color="red">Failed to Add Bid, Error Code: AB001</font></center>';
}

and that works as it should?

any ideas why my remove bid check isn’t working?

Im also trying to call the pirep form externally, i can call it up but i can’t populate it with a bid?

MainController::Run('pireps', 'Filepirep', $_GET['bidid']);

any ideas on how i can populate the form with the given bid id?

Might have to do Template::Set(), I’m not 100% sure without looking at it

i’ve tried looking at template::set but im not getting anywhere with either problem