Errors can I get a hand?
#1

Код:
(2108) : error 037: invalid string (possibly non-terminated string)
(2108) : error 017: undefined symbol "d"
(2108) : error 029: invalid expression, assumed zero
(2108) : fatal error 107: too many error messages on one line
Here is the line with the problem
Код:
pName,
Here is the whole code that its having the problem with.
Код:
public ShowStats(playerid,targetid)
{
	new string[250],pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid,pName,sizeof(pName));
	format(string,sizeof(string),""embed_blue"%s "embed_white"stats\n\
                                "embed_blue"Money:"embed_white"$%d\n\
                                "embed_blue"Admin Level:"embed_white"%d\n\
                                pName,
                                pInfo[playerid][pMoney],
								pInfo[playerid][AdminLevel],
	ShowPlayerDialog(playerid,1234,DIALOG_STYLE_MSGBOX,""embed_white"Stats",string,"Ok","");
	return 1;
}
Reply
#2

pawn Код:
pName;
Reply
#3

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
pawn Код:
pName;
Didn't fix it, still has the errors.
Код:
error 037: invalid string (possibly non-terminated string)
error 017: undefined symbol "d"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Reply
#4

That's because you wrong coded this part:

pawn Код:
format(string,sizeof(string),""embed_blue"%s "embed_white"stats\n\
                                "
embed_blue"Money:"embed_white"$%d\n\
                                "
embed_blue"Admin Level:"embed_white"%d\n\
                                pName,
                                pInfo[playerid][pMoney],
                                pInfo[playerid][AdminLevel],
The pInfo values should go after you add the %d.
Reply
#5

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
That's because you wrong coded this part:

pawn Код:
format(string,sizeof(string),""embed_blue"%s "embed_white"stats\n\
                                "
embed_blue"Money:"embed_white"$%d\n\
                                "
embed_blue"Admin Level:"embed_white"%d\n\
                                pName,
                                pInfo[playerid][pMoney],
                                pInfo[playerid][AdminLevel],
The pInfo values should go after you add the %d.
Isn't that what its doing?
Reply
#6

Код:
error 037: invalid string (possibly non-terminated string)
pawn Код:
format(string,sizeof(string),""embed_blue"%s "embed_white"stats\n\
                                "
embed_blue"Money:"embed_white"$%d\n\
                                "
embed_blue"Admin Level:"embed_white"%d\n\"
                                pName,
                                pInfo[playerid][pMoney],
                                pInfo[playerid][AdminLevel]);
You missed out a " before pName to terminate the string.
Reply
#7

Quote:
Originally Posted by Ray0
Посмотреть сообщение
Код:
error 037: invalid string (possibly non-terminated string)
pawn Код:
format(string,sizeof(string),""embed_blue"%s "embed_white"stats\n\
                                "
embed_blue"Money:"embed_white"$%d\n\
                                "
embed_blue"Admin Level:"embed_white"%d\n\"
                                pName,
                                pInfo[playerid][pMoney],
                                pInfo[playerid][AdminLevel]);
You missed out a " before pName to terminate the string.
Код:
                        "embed_blue"Admin Level:"embed_white"%d\n\"

It moved everything to this string now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)