[COMMAND] Help I made a command and I get this warning
#1

Hello, I made a new command /bizmoney but at compiling it compiles but I have one warning. How I solve this warning?

Код:
forward ResetBizCash(playerid);
Код:
new BizCash[MAX_PLAYERS];

Код:
OnPlayerCommandText
Код:
	if(strcmp(cmd, "/bizmoney", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  	{
	    if(PlayerInfo[playerid][pBizOwn] < 1)
			{
	  	    if(BizCash[playerid] == 0)
			  {
  	      GivePlayerMoney(playerid, 500000);
          SendClientMessage(playerid, COLOR_GREEN, "You got 500.000$ from The State!");
			  }
	  	    if(BizCash[playerid] == 1)
			  {
          SendClientMessage(playerid, COLOR_GREEN, "You can get your Business money tomorrow!");
					SetTimerEx("ResetBizCash", 86400000, 0, "d", playerid);
				}
			}
		}
		return 1;
	}
and

Код:
public ResetBizCash(playerid)
{
 BizCash[playerid] == 0;
}
And the problem is at the line "BizCash[playerid] == 0" error: warning 215: expression has no effect

HELP ME PLEASE
Reply
#2

Remove one of the = so it will be like this:
pawn Код:
public ResetBizCash(playerid)
{
 BizCash[playerid] = 0;
}
Reply
#3

Impossible?
Reply
#4

The rest of the script it's ok? or I have to change there something
Reply
#5

Quote:
Originally Posted by Trafikk
The rest of the script it's ok? or I have to change there something
I can't see anything wrong.
Reply
#6

Quote:
Originally Posted by Trafikk
The rest of the script it's ok? or I have to change there something
READ THE FIRST REPLY Very slow till you understand!
Reply
#7

I readed, I done that, I compilet succesuful 0 warns, 0 errors but the command doesn't work Does somebody know how to make a command that if a Biz owner types /bizmoney or something he get the amount of money defined and can use that command only after 1 day.
Reply
#8

pawn Код:
if(strcmp(cmd, "/bizmoney", true) == 0)
    {
      if(IsPlayerConnected(playerid))
        {
        if(PlayerInfo[playerid][pBizOwn] < 1)
            {
            if(BizCash[playerid] == 0)
              {
          GivePlayerMoney(playerid, 500000);
          SendClientMessage(playerid, COLOR_GREEN, "You got 500.000$ from The State!");
BizCash[playerid] == 1;
              }
            if(BizCash[playerid] == 1)
              {
          SendClientMessage(playerid, COLOR_GREEN, "You can get your Business money tomorrow!");
                    SetTimerEx("ResetBizCash", 86400000, 0, "d", playerid);
BizCash[playerid] == 0;
                }
            }
        }
        return 1;
    }
Or ST like that. But timer is not good for this, use players account to save the variable in and set a timer... and so
Reply
#9

pawn Код:
if(strcmp(cmd, "/bizmoney", true) == 0)
{
  if(IsPlayerConnected(playerid))
 {
    if(PlayerInfo[playerid][pBizOwn] < 1)
{
     if(BizCash[playerid] = 0)
  {
          GivePlayerMoney(playerid, 500000);
          SendClientMessage(playerid, COLOR_GREEN, "You got 500.000$ from The State!");
BizCash[playerid] = 1;
  }
     if(BizCash[playerid] = 1)
  {
          SendClientMessage(playerid, COLOR_GREEN, "You can get your Business money tomorrow!");
SetTimerEx("ResetBizCash", 86400000, 0, "d", playerid);
BizCash[playerid] = 0;
}
}
}
return 1;
}
Look Bro' The Guy That Told To In the First Reply He told you to do like I did now Try to copy This I mean What I Wrote and just Write If you Have an Worning Or Eror Ok bro'?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)