Convert Error.
#1

Hello,
I was trying to convert my SAMP script, done everything what the pinned tutorials above here says but it's still not working.
Maybe I did somthing wrong? These errors I'm getting when I try to compile:

Код:
warning 218: old style prototypes used with optional semicolumns
error 025: function heading differs from prototype
error 017: undefined symbol "receiverid"
error 017: undefined symbol "receiverid"
error 017: undefined symbol "receiverid"

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

4 Errors.
The first error is located in this part:

Код:
OnPlayerPrivmsg(playerid,receiverid,text[]);
The last 4 errors are located in this part:
Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
  new pname[MAX_PLAYER_NAME];
	new rname[MAX_PLAYER_NAME];
	new tmpstring[256];
	GetPlayerName(receiverid,rname,sizeof(rname));
	GetPlayerName(playerid,pname,sizeof(pname));
	format(tmpstring,sizeof(tmpstring),"to %s(%d): %s",rname,receiverid,text);
	SendClientMessage(playerid,0xFFCC22FF,tmpstring);
	format(tmpstring,sizeof(tmpstring),"from %s(%d): %s",pname,playerid,text);
	SendClientMessage(receiverid,0xFFFF22FF,tmpstring);
	return 1;
}
Reply
#2

OnPlayerPrivmsg is removed in 0.3
Reply
#3

But what I'm doing wrong then? I've just followed the tutorial.
Reply
#4

If you are using that tutorial check information about forwarding OnPlayerPrivmsg which is posted in that topic.
Reply
#5

Thanks, Fixed the last 4 errors, OnPlayerPrivmsg(playerid,recieverid,text[]); recieverid has to be receiverid.

But i've still got the first error.
Reply
#6

I've never seen your first warning there. I'm sure it has something to do with a ':' instead of a ';'

Your second warning is there because you your 'forward' line for OnPlayerPrivmsg is incorrect. Look at the paramters closely. (make sure receiverid is spelled correctly)
Reply
#7

Oke thanks, i'll try it out
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)