29.02.2012, 12:02
Why doesn't this work?
When I added this code to the gamemode it displayed the error "Run Time Error 19: File or function is not found." in the server console.
Why isn't this working?
Notes:
The string sizes are all under 800.
When I comment out all three of the mysql_query(Query); like //mysql_query(Query); the rest of the script loads just fine.
Code:
new Query[1000]; strcat(Query, "CREATE TABLE IF NOT EXISTS Server("); strcat(Query, "Name VARCHAR(100), Mode VARCHAR(100), Map VARCHAR(100), Website VARCHAR(100), Year INT(20), "); strcat(Query, "Month INT(20), MonthName VARCHAR(100), Day INT(20), GMTOffset INT(20), Hour INT(20), "); strcat(Query, "Minute INT(20), Second INT(20), TimeUS VARCHAR(100), TimeEU VARCHAR(100), Date VARCHAR(100), "); strcat(Query, "Weather INT(20), AccountsPeak INT(20), AccountsConnected INT(20), TotalAccounts INT(20), "); strcat(Query, "VehiclesConnected INT(20), TotalVehicles INT(20))"); mysql_query(Query); strdel(Query, 0, 1000); strcat(Query, "CREATE TABLE IF NOT EXISTS Accounts("); strcat(Query, "IP VARCHAR(100), Ping INT(20), Name VARCHAR(100), Password VARCHAR(100), Registered INT(20), "); strcat(Query, "RegisteredDate VARCHAR(100), RegisteredTimeUS VARCHAR(100), RegisteredTimeEU VARCHAR(100), "); strcat(Query, "LoggedIn INT(20), LastLoginDate VARCHAR(100), LastLoginTimeUS VARCHAR(100), "); strcat(Query, "LastLoginTimeEU VARCHAR(100), Tutorial INT(20), SpawnWorld INT(20), SpawnInterior INT(20), "); strcat(Query, "SpawnX FLOAT(20), SpawnY FLOAT(20), SpawnZ FLOAT(20), SpawnA FLOAT(20), PosWorld INT(20), "); strcat(Query, "PosInterior INT(20), PosX FLOAT(20), PosY FLOAT(20), PosZ FLOAT(20), PosA FLOAT(20), "); strcat(Query, "Armour FLOAT(20), Health FLOAT(20), Skin INT(20), Money INT(20), Spectating INT(20), "); strcat(Query, "Frozen INT(20), AdminLevel INT(20), AdminRank VARCHAR(100))"); mysql_query(Query); strdel(Query, 0, 1000); strcat(Query, "CREATE TABLE IF NOT EXISTS Vehicles("); strcat(Query, "ID INT(20), Spawned INT(20), GameID INT(20), Model INT(20), SpawnWorld INT(20), "); strcat(Query, "SpawnInterior INT(20), SpawnX Float(20), SpawnY Float(20), SpawnZ Float(20), SpawnA Float(20), "); strcat(Query, "PosWorld INT(20), PosInterior INT(20), PosX Float(20), PosY Float(20), PosZ Float(20), "); strcat(Query, "PosA Float(20), Color1 INT(20), Color2 INT(20), PaintJob INT(20), Mod0 INT(20), Mod1 INT(20), "); strcat(Query, "Mod2 INT(20), Mod3 INT(20), Mod4 INT(20), Mod5 INT(20), Mod6 INT(20), Mod7 INT(20), "); strcat(Query, "Mod8 INT(20), Mod9 INT(20), Mod10 INT(20), Mod11 INT(20), Mod12 INT(20), Mod13 INT(20), "); strcat(Query, "Locked INT(20), Engine INT(20), Lights INT(20), Alarm INT(20), Doors INT(20), Hood INT(20), "); strcat(Query, "Trunk INT(20), Health FLOAT(20), DamagePanels INT(20), DamageDoors INT(20), "); strcat(Query, "DamageLights INT(20), DamageTires INT(20), License VARCHAR(100), SpeedMPH INT(20), "); strcat(Query, "SpeedKMPH INT(20))"); mysql_query(Query);
Why isn't this working?
Notes:
The string sizes are all under 800.
When I comment out all three of the mysql_query(Query); like //mysql_query(Query); the rest of the script loads just fine.