Tiny problem
#1

Код:
E:\SA-MP Server\gamemodes\lvdm.pwn(577) : warning 209: function "OnPlayerCommandText" should return a value
Line:

pawn Код:
}
     SendClientMessage(playerid, RED, "That is an unknown command! Type /cmds for a list of available commands.");
}
It may be a small spelling mistake somewhere, but I'm not very sure.
Reply
#2

All you have to do is return 1; or return 0; Depending on if you want it to say Unknown Command or not. 1 Means no message all fine, 0 means the command does not exist.
Reply
#3

You must to have
Код:
return SendClientMessage(playerid, RED, "That is an unknown command! Type /cmds for a list of available commands.");
so will be:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    //stuff
    //another stuff
    return SendClientMessage(playerid, RED, "That is an unknown command! Type /cmds for a list of available commands.");
}
Reply
#4

if(strcmp(cmdtext, "/command", true) == 0);
{
SendClientMessage(playerid, RED, "That is an unknown command! Type /cmds for a list of available commands.");
return 1;
}

Try that
Reply
#5

Quote:
Originally Posted by costel_nistor96
Посмотреть сообщение
You must to have
Код:
return SendClientMessage(playerid, RED, "That is an unknown command! Type /cmds for a list of available commands.");
so will be:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    //stuff
    //another stuff
    return SendClientMessage(playerid, RED, "That is an unknown command! Type /cmds for a list of available commands.");
}
Ah, I remember that now. I'm such an idiot, thanks for helping.
Reply
#6

pawn Код:
}
     else return SendClientMessage(playerid, RED, "That is an unknown command! Type /cmds for a list of available commands.");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)