SA-MP Forums Archive
Help with MySQL - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with MySQL (/showthread.php?tid=663352)



Help with MySQL - Shoker - 28.01.2019

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);
}



Re: Help with MySQL - Banditul18 - 28.01.2019

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


Re: Help with MySQL - fiki574 - 29.01.2019

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