[Help]Me!
#1

pawn Код:
// Smoking command
    if(strcmp("/smoke", cmd, true) == 0)
    {
        new Playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Playername, 24);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
        GivePlayerMoney(playerid, -2);
      format(actiontext,MAX_CHATBUBBLE_LENGTH,"*%s takes out a cigarette and lights it*",Playername,);
        SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,15.0,10000);
    SendClientMessage(playerid,ACTION_COLOR,actiontext);
        return 1;
    }
It gives me errors
Код:
C:\Counter-Strike 2D\Server\filterscripts\chatcmds.pwn(89) : error 029: invalid expression, assumed zero
C:\Counter-Strike 2D\Server\filterscripts\chatcmds.pwn(89) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Line 89
format(actiontext,MAX_CHATBUBBLE_LENGTH,"*%s takes out a cigarette and lights it*",Playername,);
Reply
#2

Here:

Код:
if(strcmp("/smoke", cmd, true) == 0)
	{
		new Playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, Playername, 24);
		SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
		GivePlayerMoney(playerid, -2);
  	format(actiontext,MAX_CHATBUBBLE_LENGTH,"*%s takes out a cigarette and lights it*",Playername);
  	SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,15.0,10000);
  	SendClientMessage(playerid,ACTION_COLOR,actiontext);
	}
	return 1;
Reply
#3

What you changed?
Reply
#4

Quote:
Originally Posted by Thrarod
What you changed?
you got a ' , ' after, PlayerName.
Reply
#5

XD I never saw that
Reply


Forum Jump:


Users browsing this thread: