Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: KAKAN on Sep 01, 2015, 05:34 PM

Title: Unban error
Post by: KAKAN on Sep 01, 2015, 05:34 PM
Previously i have a UNBAN cmd error which was fixed, but after making a PHP file for Ban(it will be like baninfo), my unban cmd doesn't works, actually it doesn't gives out any error, but after unbanning the data in the database files remains there, when i turn off my Apache and try it works, what's the error?
Title: Re: Unban error
Post by: Thijn on Sep 01, 2015, 05:38 PM
You're probably not properly closing the database with apache. That way the file keeps locked for Apache and vcmp is unable to write to it.
Title: Re: Unban error
Post by: KAKAN on Sep 01, 2015, 05:44 PM
Can ya tell me how to do it?
Title: Re: Unban error
Post by: Thijn on Sep 01, 2015, 06:18 PM
Post some code.
Title: Re: Unban error
Post by: KAKAN on Sep 01, 2015, 06:25 PM
Which code shall i post?
The PHP code or my unban cmd code?
Title: Re: Unban error
Post by: Thijn on Sep 01, 2015, 06:33 PM
unban cmd.

Also, do any other commands work that change the same database? Logging in, kill stats etc.?
Title: Re: Unban error
Post by: KAKAN on Sep 01, 2015, 06:38 PM
Oh yea, login, register, LMS, k/d stats, lastseen, aliases
Title: Re: Unban error
Post by: KAKAN on Sep 01, 2015, 06:39 PM
here's the unban cmd
else if ( cmd ==  FBS_PREFIX + "unban" )
    {
        if ( level < 4 ) EchoMessage( "Error - You don't have access to it.");
       else if ( !text ) EchoMessage( "Error - Syntax: !unban <player name>");
       else
       {         
         local query = QuerySQL( sqliteDB, "SELECT * FROM Bans WHERE Name='" + text + "'" );
         if( GetSQLColumnData( query, 0 ) )
{
  QuerySQL( sqliteDB, "DELETE FROM Bans WHERE Name='" + text + "'" );
  EMessage( "Admin " + user + " has unbanned " + text );
}
         else EchoNotice( user, "This nick isn't banned. Please type the banned nick." );
         FreeSQLQuery( query );
   }
    }
Title: Re: Unban error
Post by: Thijn on Sep 01, 2015, 06:53 PM
Try using S.L.C.'s SQLite plugin (http://forum.vc-mp.org/?topic=420.0) so you actually get an error message.
Title: Re: Unban error
Post by: KAKAN on Sep 02, 2015, 08:22 AM
Actually, unban is working perfectly when  i turn off Apache, does the webstats and the server needs to be in one directory?
And how can  i use MySQL for WebStats, I use your WebStats PHP version, so will it harm when registering accounts?
Title: Re: Unban error
Post by: KAKAN on Sep 04, 2015, 11:57 AM
FIXED