Author Topic: Host name code  (Read 1056 times)

i have a code and its for my own server build trust mod and here is the problem:
Code: [Select]
function serverCmdPlantBrick(%client)
{
if($ServerBuildTrust::Enabled)
{
%host = %client.bl_id != getNumKeyID();

if(getTrustLevel(%host,%client) < 2)
{
centerPrint(%client,"<color:FFC800> " @ %host.name @ " <color:FFFFFF>does not trust you enough to build on their server",2,2);
return;
}
}

Parent::serverCmdPlantBrick(%client);
}
the darn %host thing doesnt want to work can some one help me?

check your console.txt in blockland file.

It says:
Code: [Select]
ERROR: getBL_IDfromObject() - "1" (%obj1) is not an object
BackTrace: ->[JVS_Content]ServerCmdPlantBrick->[ServerBuildTrust]ServerCmdPlantB
rick->getTrustLevel


localClientConnection is the server host.

what does this do anyway?
Code: [Select]
%host = %client.bl_id != getNumKeyID();
it looks like %host = (%client.bl_id != getNumKeyID());, compairing then setting, as i think kalphiter is saying

while(1) { hostname(); }

User was banned for this post
« Last Edit: February 24, 2011, 10:59:03 PM by Badspot »


localClientConnection is the server host.
Not on dedicated servers.

As Kalphiter mentioned:
Code: [Select]
%client.bl_id != getNumKeyID()
is setting the %host variable to a conditional value. Meaning, if the client's id is not the host's id then it will be 1 (true) or if not it will be 0 (false).

Remove the "%client.bl_id !=" and leave the getNumKeyID() part.


fixed it.
Edit: I tried it and still doesn't work I have it:
Code: [Select]
%host = getNumKeyID();Syntax error this time:
Code: [Select]
ERROR: getBL_IDfromObject() - "8907" (%obj1) is not an object
BackTrace: ->[JVS_Content]ServerCmdPlantBrick->[ServerBuildTrust]ServerCmdPlantB
rick->getTrustLevel
« Last Edit: February 25, 2011, 07:05:33 PM by thaky »