Help with MySQL
#1

Hello, i have this errors on my mod. Whats wrong?
Thank you...
Код:
C:\Users\win7\AppData\Local\Temp\Rar$DIa5516.25492\vehicle.pwn(244) : error 075: input line too long (after substitutions)
C:\Users\win7\AppData\Local\Temp\Rar$DIa5516.25492\vehicle.pwn(245) : error 037: invalid string (possibly non-terminated string)
C:\Users\win7\AppData\Local\Temp\Rar$DIa5516.25492\vehicle.pwn(245) : error 017: undefined symbol "create"
C:\Users\win7\AppData\Local\Temp\Rar$DIa5516.25492\vehicle.pwn(245) : error 017: undefined symbol "table"
C:\Users\win7\AppData\Local\Temp\Rar$DIa5516.25492\vehicle.pwn(245) : fatal error 107: too many error messages on one line
Код:
CheckVehicleTable()
{
	new string[1024];
	format(string, sizeof(string), "create table if not exists cvehicle(\
	vehicleID INT(12) NOT NULL PRIMARY KEY AUTO_INCREMENT,\
	vehicleExists INT(1) DEFAULT 0,\
	vehicleModel INT(3) DEFAULT 560,\
	vehicleColor1 INT(3) DEFAULT 0,\
	vehicleColor2 INT(3) DEFAULT 0,\
	vehicleOwner VARCHAR(24) DEFAULT 'Yok',\
	vehicleLock INT(1) DEFAULT 0,\
	vehicleComponent VARCHAR(128) DEFAULT '0|0|0|0|0|0|0|0|0|0|0|0|0',\
	vehiclePaintJob INT(1) DEFAULT 0,\
	vehiclePos VARCHAR(64) DEFAULT '0|0|0|0',\
	vehicleInterior INT(12) DEFAULT '0',\
	vehicleVirtual INT(12) DEFAULT '0'\
	)\
	Engine = InnoDB");
	
	return mysql_tquery(handle, string);
}
Reply
#2

You need to use strcat to reduce from the size of the line and yet keep the entire string

Also some of yours columns give me headache
Reply
#3

Use strcat as Bandit said, and those \ are completely unnecessary.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)