Pawno Errors Input Line Too Long
#1

pawn Код:
mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
    mysql_query("CREATE TABLE IF NOT EXISTS playerdata(Username VARCHAR(24), Password VARCHAR(40), Level INT(20), Gender INT(20), Cash INT(20), Bank INT(20), Job INT(20), BirthDate INT(20), BirthMonth INT(20), BirthYear INT(20), AdminLevel INT(20), AdminDuty INT(20), IP VARCHAR(15), Skin INT(20), FishPermit INT(20), Fish1 INT(20), Fish2 INT(20), Fish3 INT(20), Fish4 INT(20), Fish5 INT(20), Fishes INT(20), FishName1 VARCHAR(24), FishName2 VARCHAR(24), FishName3 VARCHAR(24), FishName4 VARCHAR(24), FishName5 VARCHAR(24), FishNames INT(20), PosX float, PosY float, PosZ float, PosA float, Registered INT(20)");
    mysql_debug(1);
pawn Код:
C:\Documents and Settings\Aphex\Desktop\Domination Roleplay\gamemodes\DNRP.pwn(197) : error 075: input line too long (after substitutions)
C:\Documents and Settings\Aphex\Desktop\Domination Roleplay\gamemodes\DNRP.pwn(198) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\Aphex\Desktop\Domination Roleplay\gamemodes\DNRP.pwn(198) : error 017: undefined symbol "CREATE"
C:\Documents and Settings\Aphex\Desktop\Domination Roleplay\gamemodes\DNRP.pwn(198) : error 017: undefined symbol "TABLE"
C:\Documents and Settings\Aphex\Desktop\Domination Roleplay\gamemodes\DNRP.pwn(198) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Reply
#2

pawn Код:
mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
new query[2048];
format(query, sizeof(query), "CREATE TABLE IF NOT EXISTS playerdata(Username VARCHAR(24), Password VARCHAR(40), Level INT(20), Gender INT(20), Cash INT(20), Bank INT(20), Job INT(20), BirthDate INT(20), BirthMonth INT(20), BirthYear INT(20), AdminLevel INT(20), AdminDuty INT(20),");
format(query, sizeof(query), "%s IP VARCHAR(15), Skin INT(20), FishPermit INT(20), Fish1 INT(20), Fish2 INT(20), Fish3 INT(20), Fish4 INT(20), Fish5 INT(20), Fishes INT(20), FishName1 VARCHAR(24), FishName2 VARCHAR(24), FishName3 VARCHAR(24), FishName4 VARCHAR(24),", query);
format(query, sizeof(query), "%s FishName5 VARCHAR(24), FishNames INT(20), PosX float, PosY float, PosZ float, PosA float, Registered INT(20)", query);
mysql_query(query);
mysql_debug(1);
Should do it.
Your input line in the code was simply too long.
Reply
#3

Lmao yeah I couldn't think of a way to break it down, cheers!!
Reply
#4

Quote:
Originally Posted by AphexCCFC
Посмотреть сообщение
Lmao yeah I couldn't think of a way to break it down, cheers!!
You're welcome.
Reply
#5

It compiled fine but when running the server it doesn't seem to create the table and rows.
Reply
#6

Well, the query seems unfinished at the end. At least the round bracket which you opened at the beginning of it does not get closed. I am not that much into MySQL, something is wrong at the query at least, but that could be a reason.
Reply
#7

I deleted the 6 values I added to make it back to when it was actually working, recompiled and now it's not creating any tables at all.

pawn Код:
mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
    mysql_query("CREATE TABLE IF NOT EXISTS playerdata(Username VARCHAR(24), Password VARCHAR(40), Level INT(20), Gender INT(20), Cash INT(20), Bank INT(20), Job INT(20), BirthDate INT(20), BirthMonth INT(20), BirthYear INT(20), AdminLevel INT(20), AdminDuty INT(20), IP VARCHAR(15), Skin INT(20), FishPermit INT(20), Fish1 INT(20), Fish2 INT(20), Fish3 INT(20), Fish4 INT(20), Fish5 INT(20), Fishes INT(20), PosX float, PosY float, PosZ float, PosA float, Registered INT(20)");
    mysql_debug(1);
All is correct, weird :/
Reply
#8

Doesn't this:

, Registered INT(20)");

have to be:

, Registered INT(20))");

?
Because you open a bracket here: playerdata(
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)