input line too long (after substitutions)
#1

pawn Код:
format(query, sizeof(query), "SELECT X, Y, Z, A, Health, Armour, Money, Skin, kills, \
deaths, house, interior, virtualworld, bank, business, faction, factionrank, \
factionsalary, addictlevel, addictedfrom, addictstage, government, marijuana_skill, \
job, playercontract, playerpaycheck, playerpaychecktime, playerhoursonline, \
weapon_skill, fishing_skill, ArrestTime, vehicle, seat, mechanic_skill, \
playerLanguage, medicine_skill, hospital, renthouse, garage, restraunt, \
club FROM characters WHERE id = %i LIMIT 1"
,
PlayerInfo[playerid][id]);
pawn Код:
C:\Users\D\Desktop\samp03dsvr_win32\gamemodes\fate.pwn(3479) : error 075: input line too long (after substitutions)
C:\Users\D\Desktop\samp03dsvr_win32\gamemodes\fate.pwn(3480) : error 037: invalid string (possibly non-terminated string)
C:\Users\D\Desktop\samp03dsvr_win32\gamemodes\fate.pwn(3480) : error 017: undefined symbol "SELECT"
C:\Users\D\Desktop\samp03dsvr_win32\gamemodes\fate.pwn(3480) : error 017: undefined symbol "X"
C:\Users\D\Desktop\samp03dsvr_win32\gamemodes\fate.pwn(3480) : fatal error 107: too many error messages on one line
This is weird, because i have longer line than this in my script and it doesn't give any errors.
Reply
#2

make the query bigger
pawn Код:
new query[1028];
Reply
#3

Quote:
Originally Posted by thimo
Посмотреть сообщение
make the query bigger
pawn Код:
new query[1028];
Doesn't help.
Reply
#4

pawn Код:
new string[666];
format(string, sizeof(string), "SELECT X, Y, Z, A, Health, Armour, Money, Skin, kills, deaths, house, interior, virtualworld, bank, business, faction, factionrank, ");
strcat(query, string);
format(string, sizeof(string), "factionsalary, addictlevel, addictedfrom, addictstage, government, marijuana_skill, job, playercontract, playerpaycheck, playerpaychecktime, playerhoursonline, weapon_skill, fishing_skill, ArrestTime, vehicle, seat, mechanic_skill, ");
strcat(query, string);
format(string, sizeof(string), "playerLanguage, medicine_skill, hospital, renthouse, garage, restraunt, club FROM characters WHERE id = %i LIMIT 1", PlayerInfo[playerid][id]);
strcat(query, string);
Reply
#5

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
pawn Код:
new string[666];
format(string, sizeof(string), "SELECT X, Y, Z, A, Health, Armour, Money, Skin, kills, deaths, house, interior, virtualworld, bank, business, faction, factionrank, ");
strcat(query, string);
format(string, sizeof(string), "factionsalary, addictlevel, addictedfrom, addictstage, government, marijuana_skill, job, playercontract, playerpaycheck, playerpaychecktime, playerhoursonline, weapon_skill, fishing_skill, ArrestTime, vehicle, seat, mechanic_skill, ");
strcat(query, string);
format(string, sizeof(string), "playerLanguage, medicine_skill, hospital, renthouse, garage, restraunt, club FROM characters WHERE id = %i LIMIT 1", PlayerInfo[playerid][id]);
strcat(query, string);
wtf i was thinking? This works too.

pawn Код:
format(query, sizeof(query), "SELECT X, Y, Z, A, Health, Armour, Money, Skin, kills, \
    deaths, house, interior, virtualworld, bank, business, faction, factionrank, \
    factionsalary, addictlevel, addictedfrom, addictstage, government, marijuana_skill, \
    job, playercontract, playerpaycheck, playerpaychecktime, playerhoursonline, \
    weapon_skill, fishing_skill, ArrestTime, vehicle, seat, mechanic_skill, \
    playerLanguage, medicine_skill, hospital, renthouse, garage, restraunt, \
    club FROM characters WHERE id = %i LIMIT 1"
,
    PlayerInfo[playerid][id]);
    mysql_query(query, THREAD_LOADSTATS, playerid);
EDIT:
pawn Код:
format(query, sizeof(query), "SELECT * FROM characters WHERE id = %i LIMIT 1", PlayerInfo[playerid][id]);
mysql_query(query, THREAD_LOADSTATS, playerid);
I'll use this instead.
Reply
#6

I was about to say, you could use a wildcard and save yourself from writing a massive query that you don't need. You're grabbing enough data...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)