Property Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Property Help (
/showthread.php?tid=145621)
Property Help -
alan91330 - 03.05.2010
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.
Re: Property Help -
westre - 03.05.2010
Код:
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.
Re: Property Help -
alan91330 - 03.05.2010
Ohh ok, il have 2 try that 2maro morning b4 school. Thx