[Help] /tpm
#1

I'm trying to make a TDM script and i would like to create cmd /tpm. Copied something but well... I have errors. Maby someone could help me with 'em?

Errors
Код:
error 017: undefined symbol "text"
error 029: invalid expression, assumed zero
warning 215: expression has no effect
warning 204: symbol is assigned a value that is never used: "Text"
Код:
public OnPlayerTeamPrivmsg(playerid, msg[])
{
  new
    sSenderName[24],
    sString[128],
    Text[50];

  GetPlayerName(playerid, sSenderName, sizeof sSenderName);
  format(sString, sizeof sString, "TeamMessage <%s>: %s", senderName, text);

  for(new iPlayer = 0 ; iPlayer < MAX_PLAYERS; iPlayer++)
  {
    if(IsPlayerAdmin(iPlayer))
    {
      SendPlayerMessage(iPlayer, 0xFFFFFFAA, sString);
    }
  }

  return true;
}
Tried to search but nothing.. :/
Maby someone can help?
Reply
#2

Код:
public OnPlayerTeamPrivmsg(playerid, msg[])
{
  new
    sSenderName[24],
    sString[128],
    text[50];

  GetPlayerName(playerid, sSenderName, sizeof sSenderName);
  format(sString, sizeof sString, "TeamMessage <%s>: %s", senderName, text);

  for(new iPlayer = 0 ; iPlayer < MAX_PLAYERS; iPlayer++)
  {
    if(IsPlayerAdmin(iPlayer))
    {
      SendPlayerMessage(iPlayer, 0xFFFFFFAA, sString);
    }
  }

  return true;
}
When you defined "text" you defined it with a capital. I've made it so it isn't a capital. Try it now.
Reply
#3

Okay, i have 1 error and 2 warnings more.

Код:
error 029: invalid expression, assumed zero
warning 215: expression has no effect
warning 203: symbol is never used: "FcukIt_ResetPlayerMoney"
Код:
stock AC_FcukIt_ResetPlayerMoney(playerid)
{
	lTMoney[ playerid ] = 0;
	lSMoney[ playerid ] = 0;

	FcukIt_ResetPlayerMoney(playerid);

	return 1;
}
Reply
#4

Quote:
Originally Posted by Syncmaster
Okay, i have 1 error and 2 warnings more.

Код:
error 029: invalid expression, assumed zero
warning 215: expression has no effect
warning 203: symbol is never used: "FcukIt_ResetPlayerMoney"
Код:
stock AC_FcukIt_ResetPlayerMoney(playerid)
{
	lTMoney[ playerid ] = 0;
	lSMoney[ playerid ] = 0;

	FcukIt_ResetPlayerMoney(playerid);

	return 1;
}
What Section in The Code is The Error On ?
Reply
#5

The error and the first warning are in the script i posted in my first post and the last warning is mm... It shows that it's on the last line. But this ise the only piece of code where FcukIt_ResetPlayerMoney is. The problem should be there somewhere?
Reply
#6

Show your "FcukIt_ResetPlayerMoney" code as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)