16.12.2009, 02:39
I'm getting these weird errors when I add a dcmd command under onplayercommandtext
code:
I'm not sure what the problem is, because I've never had this problem before :S
Код:
C:\Users\Damien\Desktop\samp server 0.3\gamemodes\SFTDM.pwn(249) : warning 209: function "OnPlayerCommandText" should return a value C:\Users\Damien\Desktop\samp server 0.3\gamemodes\SFTDM.pwn(250) : error 078: function uses both "return" and "return <value>"
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,0);
return 1;
}
dcmd(me, 2, cmdtext); // 249
return 0; // 250
}

