Whats wrong with this code?
#1

Код:
	if(strcmp(cmdtext, "/cbuy level", true) == 0)
	{
	if GetPlayerMoney(playerid) < 10000000
	*then
	{
	SendClientMessage(playerid,COLOR_ORANGE,"Purchase Complete. You are level 1.");
    }
  else
  {
  SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: You need at least $10,000,000 to buy level.");
  }
	
	return 1;
	}
no matter what, i always get error saying not enough cash.
Reply
#2

Код:
	
if(strcmp(cmdtext, "/cbuy level", true) == 0)
	{
	if GetPlayerMoney(playerid, =< 10000000)
	{
	SendClientMessage(playerid,COLOR_ORANGE,"Purchase Complete. You are level 1.");
    }
  else
  {
  SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: You need at least $10,000,000 to buy level.");
  }
	
	return 1;
}
erm... try that
no matter what, i always get error saying not enough cash.
[/quote]
Reply
#3

pawn Код:
if(strcmp(cmdtext, "/cbuy level", true) == 0)
 {
 if (GetPlayerMoney(playerid) < 10000000)
 {
 SendClientMessage(playerid,COLOR_ORANGE,"Purchase Complete. You are level 1.");
    }
  else
  {
  SendClientMessage(playerid,COLOR_LIGHTBLUE,"Error: You need at least $10,000,000 to buy level.");
  }
 
 return 1;
 }
Reply
#4

Indent your codes .

pawn Код:
if(strcmp(cmdtext, "/cbuy level", true) == 0)
    {
        if(GetPlayerMoney(playerid) < 10000000)
        {
            SendClientMessage(playerid, COLOR_ORANGE, "Purchase Complete. You are level 1.");
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "Error: You need at least $10,000,000 to buy level.");
        }
        return 1;
    }
Reply
#5

I am on my PSP so I just fixed the code, yours isn't good indented either.
Reply
#6

Go lie to someone else (unless your making the point that you cant see indentation from a PSP, you have to make it clearer if so). Mine's how it's suppose to be.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)