error 001: expected token: ",", but found ";"
#1

D:\server\gamemodes\ExtremeGame.pwn(31163 -- 31165) : error 001: expected token: ",", but found ";" (red color)

Код:
function SalvareRealizari(playerid) {
	new string[256], query[256];
	format(string, sizeof(string),
		"%d|%d|%d",
		PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2];

	format(query, sizeof(query),
		"UPDATE `users` SET `Realizari`='%s' WHERE `ID`='%d'", string, PlayerInfo[playerid][pSQLID])
	mysql_tquery(SQL, query, "","");
	return 1;
}
D:\server\gamemodes\ExtremeGame.pwn(31169) : error 001: expected token: ";", but found "-identifier-" (lime color)
Reply
#2

PHP код:
format(string,sizeof(string),"%d|%d|%d",PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2]);
                
SendClientMessage(playerid, -1string); 
Reply
#3

Try that :

Код:
function SalvareRealizari(playerid) {
	new string[256], query[256];
	format(string, sizeof(string),
		"%d|%d|%d",
		PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2]);

	format(query, sizeof(query),
		"UPDATE `users` SET `Realizari`='%s' WHERE `ID`='%d'", string, PlayerInfo[playerid][pSQLID]);
	mysql_tquery(SQL, query, "","");
	return 1;
}
Reply
#4

^

Код:
PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2]);
Why would you add a bracket if there are no brackets on this line

edit: my bad, for that bad identation didnt figured out it was a format.
Reply
#5

Quote:
Originally Posted by Maximun
Посмотреть сообщение
Try that :

Код:
function SalvareRealizari(playerid) {
	new string[256], query[256];
	format(string, sizeof(string),
		"%d|%d|%d",
		PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2]);

	format(query, sizeof(query),
		"UPDATE `users` SET `Realizari`='%s' WHERE `ID`='%d'", string, PlayerInfo[playerid][pSQLID]);
	mysql_tquery(SQL, query, "","");
	return 1;
}
ty bro
worked with this one
Reply
#6

Quote:
Originally Posted by wallen
Посмотреть сообщение
^

Код:
PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2]);
Why would you add a bracket if there are no brackets on this line
Look ! In addition, he's having two erros If I'm correct.
Код:
format(string, sizeof(string), "%d|%d|%d",PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2]);
Reply
#7

Quote:
Originally Posted by Maximun
Посмотреть сообщение
Look ! In addition, he's having two erros If I'm correct.
Код:
format(string, sizeof(string), "%d|%d|%d",PlayerInfo[playerid][pAchievement][0], PlayerInfo[playerid][pAchievement][1], PlayerInfo[playerid][pAchievement][2]);
Yeah, i explained why, my fail
Reply
#8

Quote:
Originally Posted by wallen
Посмотреть сообщение
Yeah, i explained why, my fail
Yeah, because all lines are separated each others.

@enzulikeS, No problem bro
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)