08.07.2009, 11:11
Okay, I've started coding MySQL into my GM, but I get a bunch of errors:
pawn Код:
SetupTable()
{
new data[4096];
format(data, sizeof(data),"\
CREATE TABLE IF NOT EXISTS `%s`(\
`id` int(11) NOT NULL auto_increment PRIMARY KEY,\
`Username` varchar(30) NOT NULL, `Password` varchar(50) NOT NULL,\
`Money` int(10) NOT NULL default '0',\
`Registered` int(10) NOT NULL default '0',\
`LoggedIn` int(10) NOT NULL default '0',\
`TutDone` int(10) NOT NULL default '0',\
`Sex` int(10) NOT NULL default '0',\
`Age` int(10) NOT NULL default '0',\ // <= line 455
`Origin` int(10) NOT NULL default '0',\
`Level` int(10) NOT NULL default '0',\
`AdminLevel` int(10) NOT NULL default '0',\
`Skin` int(10) NOT NULL default '0',\
`Team` int(10) NOT NULL default '0',\
`Leader` int(10) NOT NULL default '0',\
`Rank` int(10) NOT NULL default '0',\
`Cash` int(10) NOT NULL default '0',\
`Bank` int(10) NOT NULL default '0',\
`DrivingLic` int(10) NOT NULL default '0',\
`FlyingLic` int(10) NOT NULL default '0',\
`SailingLic` int(10) NOT NULL default '0',\
`GunLic` int(10) NOT NULL default '0',\
`Drugs` int(10) NOT NULL default '0',\
`DrugPacks` int(10) NOT NULL default '0',\
`Mats` int(10) NOT NULL default '0',\
`MatPacks` int(10) NOT NULL default '0')\
",TABLENAME);
mysql_query(data);
return 1;
}
Код:
D:\Documents and Settings\Vince\Mijn Documenten\SA-MP SERVER\gamemodes\rrp.pwn(455) : error 075: input line too long (after substitutions) D:\Documents and Settings\Vince\Mijn Documenten\SA-MP SERVER\gamemodes\rrp.pwn(456) : error 037: invalid string (possibly non-terminated string) D:\Documents and Settings\Vince\Mijn Documenten\SA-MP SERVER\gamemodes\rrp.pwn(456) : error 017: undefined symbol "CREATE" D:\Documents and Settings\Vince\Mijn Documenten\SA-MP SERVER\gamemodes\rrp.pwn(456) : error 017: undefined symbol "TABLE" D:\Documents and Settings\Vince\Mijn Documenten\SA-MP SERVER\gamemodes\rrp.pwn(456) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.

