What this warning? - 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: What this warning? (
/showthread.php?tid=158883)
What this warning? -
mariokumanovac - 11.07.2010
Код:
C:\Documents and Settings\Mako\Desktop\Untitled.pwn(40) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
on this line
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buylevel", cmdtext, true, 9) == 0)
{
if(GetPVarInt(playerid, "p_Respect") >= 10)
{
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: You have buy 1 level.");
}
else
{
return SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Dont have respects.");
}
return 1;
}
} //LINE 40
Re: What this warning? -
Grim_ - 11.07.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buylevel", cmdtext, true, 9) == 0)
{
if(GetPVarInt(playerid, "p_Respect") >= 10)
{
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: You have buy 1 level.");
}
else
{
return SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Dont have respects.");
}
return 1;
}
return 0;
}
Re: What this warning? -
V1ceC1ty - 11.07.2010
Should fix.
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buylevel", cmdtext, true, 9) == 0)
{
if(GetPVarInt(playerid, "p_Respect") >= 10)
{
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: You have buy 1 level.");
}
else
{
return SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: Dont have respects.");
}
return 1;
}
return 0;
}
Re: What this warning? -
mariokumanovac - 11.07.2010
thanks very much