Author Topic: getTrustLevel() - trust levels between #### and #### are assyemtrical  (Read 1547 times)

This worked fine for a while before, but recently I've been getting this error with those that have my trust. Switching the IDs also produce an error and I can't understand why I'm getting an error now, when it worked fine before.

Code: [Select]
function serverCmdTeleport(%client,%target)
{
if(%client.dirt >= 125)
{
if(%target !$= "")
{
%target = findClientByName(%target);

if(isObject(%target.player))
{
if(getTrustLevel(%target,%client) != 0)
{
%client.player.setTransform(%target.player.getPosition());
%client.dirt -= 125;
%client.play2D(buyItemSound);
%client.centerPrint("<font:Impact:24>\c6You have teleported to" SPC %target.name SPC "for 125 dirt.",2);
}
else
{
%client.centerPrint("<font:Impact:24>\c6" @ %target.name SPC "doesn't trust you enough to teleport to them.");
%client.play2D(MiningErrorSound);
return;
}
}
else
{
%client.centerPrint("<font:Impact:24>\c6This player doesn't exist!");
%client.play2D(MiningErrorSound);
return;
}
return;
}

It returns the "so and so doesn't trust you enough stuff", but it also returns a 0 along with the error when I echo the value of getTrustLevel().

Any way to fix it?

EDIT: It only works on a dedicated server...?
« Last Edit: November 30, 2013, 03:08:41 AM by TheBlackParrot »

Try getTrustLevel(%client,%target) ? I doubt this would work, but it could be worth a try.

Try getTrustLevel(%client,%target) ? I doubt this would work, but it could be worth a try.
Switching the IDs also produce an error

getTrustLevel is supposed to be called with a brick and a client, I think.

%client.getBL_IDTrustLevel(%otherClient.BL_ID) != 0
works for me

hold up, i think that command is from something else

nope. completely default. (or from a default add-on)

why isn't it mentioned anywhere...
« Last Edit: November 30, 2013, 05:47:54 AM by Alphadin »

%client.getBL_IDTrustLevel(%otherClient.BL_ID) != 0
works for me

hold up, i think that command is from something else

nope. completely default. (or from a default add-on)

why isn't it mentioned anywhere...
That returns 0 no matter the trust level. :x

That returns 0 no matter the trust level. :x
it only works if they are in the server (Testing ID trust level without them there returns 0 at all times)

talk(%client.getBL_IDTrustLevel(%targetClient.getBLID())) - Try to see if it says anything.

Do you have any other scripts that utilize the trust system? Something else may be loving up the trust levels.

getTrustLevel is supposed to be called with a brick and a client, I think.
It works with more than just bricks and clients.

Do you have any other scripts that utilize the trust system? Something else may be loving up the trust levels.
Nothing else is.

I'll try that command again later today just in case I messed something up when trying it.