Liberty Unleashed

Scripting => Script Help => Topic started by: KingOfVC on March 22, 2016, 04:23:09 pm

Title: sqlite problem?
Post by: KingOfVC on March 22, 2016, 04:23:09 pm
when i put LoadLoc(); on onScriptLoad(), it crash the server, but i remove it, it does not crash

here LoadLoc
Code: [Select]
Loc <- {}

function LoadLoc()
{
    db <- sqlite_open( "LU.db" );
    local q = sqlite_query( db, "SELECT * FROM loc" );
while ( sqlite_column_data( q, 0 ) != null )
    {
        Loc[ sqlite_column_data( q, 0 ) ] <- {}
        Loc[ sqlite_column_data( q, 0 ) ].Pos <- ConvertStringToPos( sqlite_column_data( q, 1 ) );
        Loc[ sqlite_column_data( q, 0 ) ].Creator <- sqlite_column_data( q, 2 );
Loc[ sqlite_column_data( q, 0 ) ].Date <- sqlite_column_data( q, 3 );
sqlite_next_row( q );
    }
sqlite_free( q );
    print("\r[Loc] " + Loc.len() + " loaded." );
}

i also loaded lu_sqlite on onScriptLoad()
Title: Re: sqlite problem?
Post by: rwwpl on March 22, 2016, 11:27:34 pm
"May need to check one by one." ~ G.Translate

1 test:
Code: [Select]
print("test");
//print("here crash");
2 test:
Code: [Select]
//print("test");
print("here crash");

It will be much easier to find and fix anything.