Author Topic: Getting "Error: GetAdaptersInfo() - Unknown Error" [solved?]  (Read 1512 times)

>edit

Whenever I touch any brick of any type, I get this error. This error occurs when the code below is executed.

Thanks for helping me fix the first issue
« Last Edit: September 28, 2013, 09:21:32 PM by Achoo »

I cant see anything wrong.. Give us your entire code, in one code block per file.

Here's the edited wall of code

Code: [Select]
registerOutputEvent("GameConnection","EHO_stopEHO");
registerOutputEvent("GameConnection","EHO_startEHO");
registerOutputEvent("GameConnection","EHO_startMarathon");
registerOutputEvent("GameConnection","EHO_startExHO");

registerSpecialVar(GameConnection,"isEHO","%client.isEHO");
registerSpecialVar(GameConnection,"isMarathon","%client.isMarathon");
registerSpecialVar(GameConnection,"iloveHO","%client.iloveHO");

function GameConnection::EHO_startEHO(%client)
{
if(!%client.isEHO && !%client.isMarathon && !%client.iloveHO)
{
messageClient(%client,'MsgAdminForce',"<color:ff0000>EHO is now enabled.<color:ffffff> Dying DOES NOT disable this.");
%client.isEHO = true;
}
}
function GameConnection::EHO_stopEHO(%client)
{

if(%client.isEHO)
{
messageClient(%client,'MsgAdminForce',"<color:ff0000>EHO is now disabled.<color:ffffff> Go back to the start to re-enable.");
%client.isEHO = false;
}
else if(%client.iloveHO)
{
messageClient(%client,'MsgAdminForce',"<color:ff0000>ExHO is now disabled.<color:ffffff> Go back to the start to re-enable.");
%client.iloveHO = false;
}
}
function GameConnection::EHO_startMarathon(%client)
{
if(!%client.isEHO && !%client.isMarathon && !%client.iloveHO)
{
messageClient(%client,'MsgAdminForce',"<color:ff0000>You are now in the marathon.<color:ffffff> Dying disables this.");
%client.isMarathon = true;
}
}
function GameConnection::EHO_startExHO(%client)
{
if(!%client.isEHO && !%client.isMarathon && !%client.iloveHO)
{
messageClient(%client,'MsgAdminForce',"<color:ff0000>ExHO is now enabled.<color:ffffff> Dying disables this.");
%client.iloveHO = true;
}
}

package ExtraHardOptions
{
function GameConnection::onDeath(%client)
{
Parent::onDeath(%client);
if(%client.isMarathon)
{
messageClient(%client,'MsgAdminForce',"<color:ff0000>You are no longer in the marathon. <color:ffffff> Go back to the start to re-join.");
%client.isMarathon = false;
}
else if(%client.iloveHO)
{
messageClient(%client,'MsgAdminForce',"<color:ff0000>ExHO is no longer enabled.<color:ffffff> Go back to the start to re-enable.");
%client.iloveHO = false;
}
}
};
activatePackage(ExtraHardOptions);
« Last Edit: September 28, 2013, 08:27:59 PM by Achoo »

You do not need a package here unless you plan on being able to disable the functions, or they already exist and you want to add to them. If you are, there are better ways to do so.
I think the registerOutputEvent isn't finding the function because the package is disabled when it gets called. Remove the package and I think it will work.

It almost crashed me when I CTRL+K'd. I think I need to have a package at least around the onDeath function.
I will do that and report back

>edit
It fixed the death bug and the "unknown command".

Now I need help with the GetAdapterInfo() bug
« Last Edit: September 28, 2013, 08:24:06 PM by Achoo »

Oh right, yeah, missed that part. onDeath has to be packaged because you don't want to over write it.

The getAdapterInfo, i've never heard of it, but to me it sounds like a client sided function. Try disabling the add-on and see if the problem persists, if it does, then its another add-on causing it.

Also, you should put your registerSpecialVar's into the function VCE_initServer(), packaged and parented of course. VCE does this for a reason, although i'm not clear on what it is. All it does is executes once after the server has started.
« Last Edit: September 28, 2013, 08:31:14 PM by boodals 2 »


Try disabling the add-on and see if the problem persists, if it does, then its another add-on causing it.

So it's not this code
/brb

Edit:

Strange, it disappeared.
« Last Edit: September 28, 2013, 09:21:22 PM by Achoo »

Oh right, yeah, missed that part. onDeath has to be packaged because you don't want to over write it.

The getAdapterInfo, i've never heard of it, but to me it sounds like a client sided function. Try disabling the add-on and see if the problem persists, if it does, then its another add-on causing it.

Also, you should put your registerSpecialVar's into the function VCE_initServer(), packaged and parented of course. VCE does this for a reason, although i'm not clear on what it is. All it does is executes once after the server has started.
it does that so the definitions and stuff happen after vce is executed