SA-MP Forums Archive
Line error - 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: Line error (/showthread.php?tid=484322)



Line error - Face9000 - 30.12.2013

Quote:

(9587) : error 075: input line too long (after substitutions)
(9587) : error 037: invalid string (possibly non-terminated string)
(9587) : error 017: undefined symbol "CREATE"
(9587) : error 017: undefined symbol "TABLE"
(9587) : fatal error 107: too many error messages on one line

Any way to split this query in 2 parts and resolve errors?

pawn Код:
mysql_query("CREATE TABLE IF NOT EXISTS playerdata(user VARCHAR(24), password VARCHAR(40), Scores INT(20), Cash INT(20), Admin INT(1), Deaths INT(20), Nopm INT(20), Muted INT(20), Vip INT(20), Warn INT(20), RegisterDate INT(100), Jailed INT(20), AdminActions INT(20), Cookies INT(20), Rank INT(20), VipTime INT(20), Class INT(20), PrototypesStolen INT(20), KillAsUsaTeam INT(20), KillAsGermanyTeam INT(20), KillAsItalyTeam INT(20), KillAsJapanTeam INT(20), KillAsMercTeam INT(20), KillAsMexicoTeam INT(20), IP VARCHAR(16) )");



Re: Line error - tyler12 - 30.12.2013

pawn Код:
new string[525];
format(string,sizeof(string),"CREATE TABLE IF NOT EXISTS playerdata(user VARCHAR(24), password VARCHAR(40), Scores INT(20), Cash INT(20), Admin INT(1), Deaths INT(20), Nopm INT(20), Muted INT(20), Vip INT(20), Warn INT(20), RegisterDate INT(100), Jailed INT(20), AdminActions INT(20), Cookies INT(20),");
format(string,sizeof(string),"%s Rank INT(20), VipTime INT(20), Class INT(20), PrototypesStolen INT(20), KillAsUsaTeam INT(20), KillAsGermanyTeam INT(20), KillAsItalyTeam INT(20), KillAsJapanTeam INT(20), KillAsMercTeam INT(20), KillAsMexicoTeam INT(20), IP VARCHAR(16)",string);
mysql_query(string);



Re: Line error - Konstantinos - 30.12.2013

You could've found the answer to your question in less than a minute by searching - it's been answered many times.
Use strcat.


Re: Line error - Face9000 - 30.12.2013

Used strcat and made this:

pawn Код:
new dt[600];
    strcat(dt,"CREATE TABLE IF NOT EXISTS playerdata(user VARCHAR(24), password VARCHAR(40), Scores INT(20), Cash INT(20), Admin INT(1), Deaths INT(20), Nopm INT(20), Muted INT(20), Vip INT(20), Warn INT(20)");
    strcat(dt,"RegisterDate INT(100), Jailed INT(20), AdminActions INT(20), Cookies INT(20), Rank INT(20), VipTime INT(20), Class INT(20), PrototypesStolen INT(20)");
    strcat(dt,"KillAsUsaTeam INT(20), KillAsGermanyTeam INT(20), KillAsItalyTeam INT(20), KillAsJapanTeam INT(20), KillAsMercTeam INT(20), KillAsMexicoTeam INT(20), IP VARCHAR(16))");
    mysql_query(dt);
    mysql_debug(1);
And im getting error 010: invalid function or declaration at this lines.

I also tried your code tyler12, and same result.


Re: Line error - Face9000 - 30.12.2013

Fixed.