SA-MP Forums Archive
Convert Error. - 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: Convert Error. (/showthread.php?tid=106743)



Convert Error. - ModernRP - 05.11.2009

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;
}



Re: Convert Error. - dugi - 05.11.2009

OnPlayerPrivmsg is removed in 0.3


Re: Convert Error. - ModernRP - 05.11.2009

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


Re: Convert Error. - dugi - 05.11.2009

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


Re: Convert Error. - ModernRP - 05.11.2009

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

But i've still got the first error.


Re: Convert Error. - Joe Staff - 05.11.2009

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)


Re: Convert Error. - ModernRP - 05.11.2009

Oke thanks, i'll try it out