onplayercommandreceived help
#1

gives me 3 errors

C:\Users\Trayansh\Desktop\SAMP\gamemodes\register. pwn(359) : error 055: start of function body without function header
C:\Users\Trayansh\Desktop\SAMP\gamemodes\register. pwn(360) : error 010: invalid function or declaration
C:\Users\Trayansh\Desktop\SAMP\gamemodes\register. pwn(364) : error 010: invalid function or declaration

Код:
public OnPlayerCommandReceived(playerid,cmdtext[]);
{
   if(PInfo[playerid][CMuted] == 1)
	{
		format(string,sizeof(string),"You are still muted, You can use all the commands after %d seconds.",PInfo[playerid][CMutedSec]);
	    SendClientMessage(playerid,COLOR_RED,string);
	    return 0;
	}
}
Reply
#2

pawn Код:
public OnPlayerCommandReceived(playerid,cmdtext[]);
Remove the ";", you shouldn't use that with a function/public function title.
Also, you need to define "string", like this:
pawn Код:
new string[size];
Reply
#3

Thanks dude,i kept searching for mistake for 10 mins and it was that little semi colon ._.
and yeah i defined that later

"You must spread some reputation around before giving it to Calvin.."
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)