Author Topic: sqlite problem?  (Read 2295 times)

KingOfVC

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
  • pig
    • View Profile
    • Find Sexy Womans from your town for night
sqlite problem?
« on: March 22, 2016, 05: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()
« Last Edit: March 22, 2016, 05:27:53 pm by KingOfVC »

rwwpl

  • Full Member
  • ***
  • Posts: 126
  • Karma: +18/-6
  • LU-DM Team
    • View Profile
    • LU-DM Team
Re: sqlite problem?
« Reply #1 on: March 23, 2016, 12:27:34 am »
"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.
« Last Edit: March 23, 2016, 09:24:39 am by rwwpl »

 

© Liberty Unleashed Team.