Property Help
#1

Hi again, lol probably getting sick of me. lol neway,
Trying to code for properties on my server, and i am coding the commands
(/buyproperty), and (/sellproperty)
my code is
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 if (strcmp("/buyproperty", cmdtext, true) == 0)
{
  BuyPropertyForPlayer(playerid);
  return 1;
}
 if (strcmp("/sellproperty", cmdtext, true) == 0)
{
  SellPropertyForPlayer(playerid);
  return 1;
}

 }
When i go to compile it, it gives me this
Quote:

(249) : warning 209: function "OnPlayerCommandText" should return a value

Any ideas any1? still new to coding with pawno, but i am getting better every step i take.
Reply
#2

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 if (strcmp("/buyproperty", cmdtext, true) == 0)
{
  BuyPropertyForPlayer(playerid);
  return 1;
}
 if (strcmp("/sellproperty", cmdtext, true) == 0)
{
  SellPropertyForPlayer(playerid);
  return 1;
}
return 0;
}
You forgot return 0; at the end of the callback.

Just a minor mistake -- PAWNO is the editor, PAWN is the language.
Reply
#3

Ohh ok, il have 2 try that 2maro morning b4 school. Thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)