Disagreement between "Set" and "GetDrivebyEnabled"

Started by Milos, Mar 30, 2016, 03:31 PM

Previous topic - Next topic

Milos

Is it a bug or am I using it wrong?

function onScriptLoad()
{
SetDrivebyEnabled( false );
print( "What is the answer? R: " + GetDrivebyEnabled() );
}



I'm trying to create an admin command and this is reversed.

MacTavish

yea, @Stormeus setting  SetDrivebyEnabled( false ); returns true and setting  SetDrivebyEnabled( true); returns false and sorry i haven't tested it before

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Milos

So I have to use so even or an update will be made to correct this error?

KAKAN

Quote from: Lavador on Mar 31, 2016, 11:07 PMSo I have to use so even or an update will be made to correct this error?

Make another temporary function for now. I don't think that the devs really have time to fix this small error :P
Or copy the function from here:
function SetDrivebyEnabled( bool ){
switch( bool ){
case true: return ::SetDrivebyEnabled( false );
case false: return ::SetDrivebyEnabled( true );
}
}
Untested :D
oh no

DizzasTeR

You don't even need the switch statement. The problem is with GetDrivebyEnabled() not SetDrivebyEnabled.
getDrivebyEnabled <- GetDrivebyEnabled;
GetDrivebyEnabled <- function() {
if( getDrivebyEnabled() ) return false;
else return true;
}

Stormeus

This was an issue in the Squirrel plugin, which has been fixed in source, since it treated the function as if it were "GetDrivebyDisabled". I'll push fixed builds later this evening.
https://bitbucket.org/stormeus/0.4-squirrel/commits/43456fd5de04aa3a2e970c89938c790540c90c42

ysc3839

Quote from: [R*] Stormeus on Apr 01, 2016, 01:22 PMThis was an issue in the Squirrel plugin, which has been fixed in source, since it treated the function as if it were "GetDrivebyDisabled". I'll push fixed builds later this evening.
https://bitbucket.org/stormeus/0.4-squirrel/commits/43456fd5de04aa3a2e970c89938c790540c90c42
I have waited you check my pull request for near a month. :( Could you give me a reply?

Stormeus

Quote from: ysc3839 on Apr 01, 2016, 03:09 PM
Quote from: [R*] Stormeus on Apr 01, 2016, 01:22 PMThis was an issue in the Squirrel plugin, which has been fixed in source, since it treated the function as if it were "GetDrivebyDisabled". I'll push fixed builds later this evening.
https://bitbucket.org/stormeus/0.4-squirrel/commits/43456fd5de04aa3a2e970c89938c790540c90c42
I have waited you check my pull request for near a month. :( Could you give me a reply?

I'll check it out ASAP.