Today i have been working on some stuff of some add-on, but i ran into an error which i just can't trace.
Console output:
Add-Ons/Vehicle_MAS_PowerSuit/Vehicle_PowerSuit.cs (313): Unable to find object: '' attempting to call function 'getDataBlock'
BackTrace: ->armor::DoDismount->[Event_Vehicle]armor::onUnMount->[ControlledMounts]armor::onUnMount->[MASpowerSuit]armor::onUnMount
Add-Ons/Vehicle_MAS_PowerSuit/Vehicle_PowerSuit.cs (313): Unable to find object: '' attempting to call function 'getId'
BackTrace: ->armor::DoDismount->[Event_Vehicle]armor::onUnMount->[ControlledMounts]armor::onUnMount->[MASpowerSuit]armor::onUnMount
This is what the console tells me.
Package [ControlledMounts] code:
function Armor::onUnMount(%this,%player,%obj,%a,%b,%c,%d,%e,%f)
{
if(%this.controlOnMount) {
%player.onUnMountControlledMount(%obj);
}
Parent::onUnMount(%this,%player,%obj,%a,%b,%c,%d,%e,%f);
}
This is the first onUnMount override i actually added.
Package [MASpowerSuit] code:
function Armor::onUnMount(%this,%player,%obj,%a,%b,%c,%d,%e,%f)
{
Parent::onUnMount(%this,%player,%obj,%a,%b,%c,%d,%e,%f);
if(%obj.getDataBlock().getId() == PowerSuit.getId())
{
//Triggered when player exits PowerSuit
%obj.playThread(0 , sit);
}
}
And this being the last onUnMount override i added, which apparently can't find both %obj as well as the datablock PowerSuit.
Which is odd because this:
function Armor::onMount(%this,%player,%obj,%a,%b,%c,%d,%e,%f)
{
Parent::onMount(%this,%player,%obj,%a,%b,%c,%d,%e,%f);
if(%obj.getDataBlock().getId() == PowerSuit.getId())
{
//Triggered when player enters PowerSuit
%client = %player.client;
if(isObject(%client))
ServerCmdUnUseTool(%client);
%obj.playThread(0 , root);
}
}
Is located just above the onUnMount override in the same MASPowerSuit package.
And the onMount functions works perfectly fine while using %obj and Powersuit as well.
What is wrong?
I really can't seem to find what i did wrong.