Error with script

Started by Adrenaline, Apr 05, 2017, 02:58 PM

Previous topic - Next topic

Adrenaline

I have a problem since yesterday I happen to not load the script using the "cloudwards" host on my computer it works perfectly without any error, I asked them for help and none could solve it I was told to come to you

Cloudwards


My PC


Cloudwards staff

Cool

Hehehe :P you are using Official plugin on your pc and on Cloudwards host you are using SLC plugin Official plugin is not good thats why its not giving error on your pc.
if you want we help you then line 160 here

EK.IceFlake

Quote from: happymint2 on Apr 05, 2017, 03:07 PMHehehe :P you are using Official plugin on your pc and on Cloudwards host you are using SLC plugin Official plugin is not good thats why its not giving error on your pc.
if you want we help you then line 160 here
I installed SLC's plugin to diagnose the issue. ConnectSQL was returning null on the official plugin, and SLC's plugin caused a segmentation fault on both 32 bit and 64 bit versions.

For more on the issue, this occurred only when using SLC's SQLite plugin.

KrlozZ...

The same thing happen with me ! it works on my pc but it gives error on cloudwards host.

with me its line 128:

QuerySQL( pdb, "CREATE TABLE IF NOT EXISTS Properties ( Name TEXT, PX FLOAT, PY FLOAT, PZ FLOAT, Owner VARCHAR(32), Sharer VARCHAR(32), Price NUMERIC, PropertyID INT, Salary2 NUMERIC)" );

but i have changed it to line 129, but it still gives me error on line 128, line 128 is other database like what i gave.

Adrenaline

Quote from: KrlozZ... on Apr 05, 2017, 04:12 PMThe same thing happen with me ! it works on my pc but it gives error on cloudwards host.

with me its line 128:

QuerySQL( pdb, "CREATE TABLE IF NOT EXISTS Properties ( Name TEXT, PX FLOAT, PY FLOAT, PZ FLOAT, Owner VARCHAR(32), Sharer VARCHAR(32), Price NUMERIC, PropertyID INT, Salary2 NUMERIC)" );

but i have changed it to line 129, but it still gives me error on line 128, line 128 is other database like what i gave.
Apparently we are not the only lol

KrlozZ...

Quote from: AdrenAline on Apr 05, 2017, 04:16 PM
Quote from: KrlozZ... on Apr 05, 2017, 04:12 PMThe same thing happen with me ! it works on my pc but it gives error on cloudwards host.

with me its line 128:

QuerySQL( pdb, "CREATE TABLE IF NOT EXISTS Properties ( Name TEXT, PX FLOAT, PY FLOAT, PZ FLOAT, Owner VARCHAR(32), Sharer VARCHAR(32), Price NUMERIC, PropertyID INT, Salary2 NUMERIC)" );

but i have changed it to line 129, but it still gives me error on line 128, line 128 is other database like what i gave.
Apparently we are not the only lol


mmm maybe, but it happened to me since i restarted the server, so that server which works is due they did not restarted their server yet.

but i guess these are new servers, because with me the .conf load correctly. :)

.

Quote from: EK.IceFlake on Apr 05, 2017, 03:10 PM
Quote from: happymint2 on Apr 05, 2017, 03:07 PMHehehe :P you are using Official plugin on your pc and on Cloudwards host you are using SLC plugin Official plugin is not good thats why its not giving error on your pc.
if you want we help you then line 160 here
I installed SLC's plugin to diagnose the issue. ConnectSQL was returning null on the official plugin, and SLC's plugin caused a segmentation fault on both 32 bit and 64 bit versions.

For more on the issue, this occurred only when using SLC's SQLite plugin.

What was the OS? And did you recompiled the plugin yourself or used the pre-built binaries?
.

Sebastian

I just faced such an error few days ago, and the fix was really simple.
All I need are the lines around 160. If the issue is the same as mine, than you got yourself a fix.

KrlozZ...

Quote from: sseebbyy on Apr 05, 2017, 07:21 PMI just faced such an error few days ago, and the fix was really simple.
All I need are the lines around 160. If the issue is the same as mine, than you got yourself a fix.

what about the mine ?
is it the same ?

Quote from: KrlozZ... on Apr 05, 2017, 04:12 PMThe same thing happen with me ! it works on my pc but it gives error on cloudwards host.

with me its line 128:

QuerySQL( pdb, "CREATE TABLE IF NOT EXISTS Properties ( Name TEXT, PX FLOAT, PY FLOAT, PZ FLOAT, Owner VARCHAR(32), Sharer VARCHAR(32), Price NUMERIC, PropertyID INT, Salary2 NUMERIC)" );

but i have changed it to line 129, but it still gives me error on line 128, line 128 is other database like what i gave.

the error is in all QuerySQL lines.

Sebastian

Quote from: KrlozZ... on Apr 05, 2017, 07:24 PMwhat about the mine ?

Can you show the lines 128 -> 150 ?

KrlozZ...

Quote from: sseebbyy on Apr 05, 2017, 07:27 PM
Quote from: KrlozZ... on Apr 05, 2017, 07:24 PMwhat about the mine ?

Can you show the lines 128 -> 150 ?

123-150

Registros <- ConnectSQL( "Databases/Registros.db" );
Deahtss <- ConnectSQL( "Databases/Deahtss.db" );
joins <- ConnectSQL( "Databases/joins.db" );
pdb <- ConnectSQL("Databases/props.sqlite");

QuerySQL( pdb, "CREATE TABLE IF NOT EXISTS Properties ( Name TEXT, PX FLOAT, PY FLOAT, PZ FLOAT, Owner VARCHAR(32), Sharer VARCHAR(32), Price NUMERIC, PropertyID INT, Salary2 NUMERIC)" );
QuerySQL(Registros,"CREATE TABLE IF NOT EXISTS Spawnwep( Nick TEXT, Weps TEXT)");
QuerySQL(Registros, "CREATE TABLE IF NOT EXISTS Cuenta ( Nombre TEXT, IP VARCHAR(25), Clave VARCHAR(25), Level NUMERIC, Dinero NUMERIC, Banco NUMERIC, Matanzas NUMERIC, Muertes NUMERIC, Nogoto TEXT )" );
QuerySQL(Registros, "CREATE TABLE IF NOT EXISTS Baneados(Name VARCHAR(32), IP TEXT, UniqueID VARCHAR(25), Admin TEXT, Reason TEXT )" );
QuerySQL(Registros, "CREATE TABLE IF NOT EXISTS SpawnLocs ( Name TEXT, Pos TEXT )" );
QuerySQL( Registros , "CREATE TABLE IF NOT EXISTS Alias ( Name TEXT, IP VARCHAR(20), UID TEXT )" );
QuerySQL(Registros, "CREATE TABLE IF NOT EXISTS Spawnwep( Nick TEXT, Weps TEXT)");
QuerySQL(Registros, "CREATE TABLE IF NOT EXISTS Locs(Name TEXT, X NUMERIC, Y NUMERIC, Z NUMERIC, Creator TEXT, Date TEXT, World NUMERIC )" );
QuerySQL(Registros, "CREATE TABLE IF NOT EXISTS AFK ( Nombre TEXT, POSAFKX NUMERIC, POSAFKY NUMERIC, POSAFKZ NUMERIC, ANGLEAFK NUMERIC )" );
QuerySQL(Registros, "CREATE TABLE IF NOT EXISTS Battle ( Nombre TEXT, BattleX NUMERIC, BattleY NUMERIC, BattleZ NUMERIC, ANGLEBattle NUMERIC )" );
QuerySQL(joins, "CREATE TABLE IF NOT EXISTS CuentaJoins ( Nombre TEXT, Joins NUMERIC )" );
QuerySQL(Deahtss, "CREATE TABLE IF NOT EXISTS CuentaDeahts ( Nombre TEXT, Deahts NUMERIC )" );

NewTimer("Autosave", 100, 0 );
NewTimer("Announces", 60000, 0 );

LoadProps();
LoadVehicles();
LoadAlias();
locslike03();

//skins
AddClass( 255, RGB( 224, 224, 224 ) ,200, Vector( -1184.17, -1332.91, 14.936 ), 140.020, 21, 999 ,23, 255, 26, 999999 );

Sebastian

Quote from: KrlozZ... on Apr 05, 2017, 07:30 PM

Maybe it is not even creating the database ?
You can try this: add if( pdb ) in front of QuerySQL from line 128, and run the server.
Does it still returns that error ?

KrlozZ...

Quote from: sseebbyy on Apr 05, 2017, 07:40 PM
Quote from: KrlozZ... on Apr 05, 2017, 07:30 PM

Maybe it is not even creating the database ?
You can try this: add if( pdb ) in front of QuerySQL from line 128, and run the server.
Does it still returns that error ?

scripts/main.nut line = (128) column = (7) : error end of statement expected (; or lf)

[0;30m[WARNING] Could not load script 'scripts/main.nut'

[0;30m[WARNING] end of statement expected (; or lf)

Sebastian

Replace line 128 with this:
if( pdb ) QuerySQL( pdb, "CREATE TABLE IF NOT EXISTS Properties ( Name TEXT, PX FLOAT, PY FLOAT, PZ FLOAT, Owner VARCHAR(32), Sharer VARCHAR(32), Price NUMERIC, PropertyID INT, Salary2 NUMERIC)" );

EK.IceFlake

This might be a permission issue, and if it is, you don't have to worry about it as a planned update should reset them to their default permissions.