error 075: input line too long (after substitutions)
#1

Код:
format(query,sizeof(query),"UPDATE players SET " \
	"Level = %d , " \
	"Hours = %d , " \
	"Minutes = %d , " \
	"Checks = %d , " \
	"Admin = %d , " \
	"Helper = %d , " \
	"Donator = %d , " \
	"Health = %d , " \
	"Armor = %d , " \
	"Money = %d , " \
	"Bank = %d , " \
	"Sandwiches = %d , " \
	"Hotdogs = %d , " \
	"Apples = %d , " \
	"Sodas = %d , " \
	"Skin = %d , " \
 	"Accent = '%s' , " \
	 "X = %f , " \
	 "Y = %f , " \
	 "Z = %f , " \
	 "Angle = %f , " \
	 "Faction = '%d' , " \
	 "`Faction rank` = %d , " \
	 "`Faction division` = %d , " \
	 "`Faction leader` = %d , " \
	"Prisons = %d , " \
	"Warnings = %d , " \
	"Kicks = %d , " \
	"`Temp.Bans` = %d , " \
	"`Perm.Bans` = %d " \
	"WHERE Username = '%s'",
Error:
Код:
(763) : error 075: input line too long (after substitutions)
(764) : error 037: invalid string (possibly non-terminated string)
(764) : warning 215: expression has no effect
(764) : error 001: expected token: ";", but found "`"
(764) : error 029: invalid expression, assumed zero
(764) : fatal error 107: too many error messages on one line
Lines (763) and (764):
Код:
         /*Line 763*/"`Faction division` = %d , " \
	 /*Line 764*/"`Faction leader` = %d , " \
Reply
#2

You don't need to put " at end of line if a \ is there so code would be :
PHP код:
format(query,sizeof(query),"UPDATE players SET  \
    Level = %d ,  \
    Hours = %d ,  \
    Minutes = %d ,  \
    Checks = %d ,  \
    Admin = %d ,  \
    Helper = %d ,  \
    Donator = %d ,  \
    Health = %d ,  \
    Armor = %d ,  \
    Money = %d ,  \
    Bank = %d ,  \
    Sandwiches = %d ,  \
    Hotdogs = %d ,  \
    Apples = %d ,  \
    Sodas = %d ,  \
    Skin = %d ,  \
     Accent = '%s' ,  \
     X = %f ,  \
     Y = %f ,  \
     Z = %f ,  \
     Angle = %f ,  \
     Faction = '%d' ,  \
     `Faction rank` = %d ,  \
     `Faction division` = %d ,  \
     `Faction leader` = %d ,  \
     Prisons = %d ,  \
     Warnings = %d ,  \
     Kicks = %d ,  \
    `Temp.Bans` = %d ,  \
    `Perm.Bans` = %d  \
    WHERE Username = '%s'"

Reply
#3

Again it returns errors
Reply
#4

pawn Код:
format(query,sizeof(query),"UPDATE players SET  \
    Level = %d ,  \
    Hours = %d ,  \
    Minutes = %d ,  \
    Checks = %d ,  \
    Admin = %d ,  \
    Helper = %d ,  \
    Donator = %d ,  \
    Health = %d ,  \
    Armor = %d ,  \
    Money = %d ,  "
, /*values*/);
   
    format(query,sizeof(query),"%sBank = %d ,  \
    Sandwiches = %d ,  \
    Hotdogs = %d ,  \
    Apples = %d ,  \
    Sodas = %d ,  \
    Skin = %d ,  \
     Accent = '%s' ,  \
     X = %f ,  \
     Y = %f ,  \
     Z = %f ,  \
     Angle = %f ,  "
,query, /*values*/);
     
     format(query,sizeof(query),"%sFaction = '%d' ,  \
     `Faction rank` = %d ,  \
     `Faction division` = %d ,  \
     `Faction leader` = %d ,  \
     Prisons = %d ,  \
     Warnings = %d ,  \
     Kicks = %d ,  \
    `Temp.Bans` = %d ,  \
    `Perm.Bans` = %d  \
    WHERE Username = '%s'"
, query, /*values*/);
Just split it using multiple fomats. Or you may use strcat.

/*values*/ means to values of arguments.
Reply
#5

split it in 2 lines code bcz its all is know as one line
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)