Some errors.
#1

Код:
PlayerKillScore(playerid, killerid)
{
	if (IsDsEnabled == 1)
	{
		new stri[128];
		format(stri, sizeof(stri), ""COL_YELLOW"**Double Score: "COL_RED"You earned +2 Extra Score."PlayerInfo[playerid]);
		SCM(killerid, -1, stri);
		SetPlayerScore(killerid, GetPlayerScore(killerid) +2);
	}
	else
	{
		SetPlayerScore(killerid, GetPlayerScore(killerid) +2);
	}
	return 1;
}
Код:
G:\Pawno\MW3SAMP-master\gamemodes\CODMW3.pwn(17306) : error 001: expected token: "-string end-", but found "-identifier-"
G:\Pawno\MW3SAMP-master\gamemodes\CODMW3.pwn(17306) : warning 215: expression has no effect
G:\Pawno\MW3SAMP-master\gamemodes\CODMW3.pwn(17306) : error 001: expected token: ";", but found ")"
G:\Pawno\MW3SAMP-master\gamemodes\CODMW3.pwn(17306) : error 029: invalid expression, assumed zero
G:\Pawno\MW3SAMP-master\gamemodes\CODMW3.pwn(17306) : fatal error 107: too many error messages on one line
ERROR LINE : format(stri, sizeof(stri), ""COL_YELLOW"**Double Score: "COL_RED"You earned +2 Extra Score."PlayerInfo[playerid]);
Reply
#2

pawn Код:
PlayerKillScore(playerid, killerid)
{
    if (IsDsEnabled == 1)
    {
        new stri[128];
        format(stri, sizeof(stri), ""COL_YELLOW"**Double Score: "COL_RED"You earned +2 Extra Score.", PlayerInfo[playerid]);
        SCM(killerid, -1, stri), SetPlayerScore(killerid, GetPlayerScore(killerid) +2);
    }
    else SetPlayerScore(killerid, GetPlayerScore(killerid) +2);
    return 1;
}
You were missing a , at double score message.
Reply
#3

omg i must repair my eyes xD +REP
Reply
#4

Wait, where in your line, have you used PlayerInfo[playerid]'s value?

This:
Код:
format(stri, sizeof(stri), ""COL_YELLOW"**Double Score: "COL_RED"You earned +2 Extra Score.", PlayerInfo[playerid]);
Should be
Код:
format(stri, sizeof(stri), "%s"COL_YELLOW"**Double Score: "COL_RED"You earned +2 Extra Score.", PlayerInfo[playerid]); //use %s for string, where ever you want to display the value. Otherwise, using PlayerInfo[playerid] is useless.
And second, are you sure PlayerInfo[playerid] is the end of the variable?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)