[HLEP]3 Warnings.
#1

C:\Users\Liuyuan\Desktop\gta\gamemodes\lvrcr.pwn(3 6) : warning 201: redefinition of constant/macro (symbol "MAX_PICKUPS")
C:\Users\Liuyuan\Desktop\gta\gamemodes\lvrcr.pwn(5 306) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Users\Liuyuan\Desktop\gta\gamemodes\lvrcr.pwn(1 4759) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
What should I do I really liked the script?
Reply
#2

Add these lines:
pawn Код:
#undef MAX_PICKUPS
#define MAX_PICKUPS (Your number here)

forward OnPlayerPrivmsg(playerid);
forward OnPlayerInfoChange(playerid);
Now, Compile the script. There should be no errors.

BUT If you get the warning/error: "function heading differs from prototype" then you should make sure its like that:
pawn Код:
OnPlayerPrivmsg(//The parameters in it's public);
OnPlayerInfoChange(//The parameters in it's public);
Reply
#3

forward OnPlayerPrivmsg(playerid);
forward OnPlayerInfoChange(playerid);

add to your script

and delete Max_PICKUPS
Reply
#4

OnPlayerPrivmsg is a deprecated callback. It was removed in 0.3a I think, so you have to replace it with your own /PM command.

// check the wiki on how to make a PM command1
Reply
#5

Thank you: ) but I have found a new error
C:\Users\Liuyuan\Desktop\gta\gamemodes\lvrcr.pwn(5 30 : error 025: function heading differs from prototype
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
if(Muted[playerid] == 1) {
SendClientMessage(playerid, COLOR_ERROR, "You are Muted. You Cannot Use This Command");
return 0;
}
if(pmsoff[recieverid] == 1) {
SendClientMessage(playerid, COLOR_YELLOW, "That player is not accepting Private Messages at this time");
return 0;
}
SendClientMessage(recieverid, COLOR_GREY, "Type /pmoff to refuse Personal Messages");
SpamStrings[playerid] ++;
new pmsg[128];
new priname[32],prinamee[32];
GetPlayerName(playerid,priname, sizeof(priname));
GetPlayerName(recieverid,prinamee, sizeof(prinamee));
format(pmsg, sizeof(pmsg), "2**(PM)** From \2;%s(%i)\2; To \2;%s(%i)\2; - %s",priname,playerid,prinamee,recieverid,text); // [0] <jacob> hi
ircSay(EchoConnection, EchoChan,pmsg);

return 1;
}
Reply
#6

That is because you forwarded the function with different parameters than those you pass to it.

And as AndreT stated, OnPlayerPrivmsg was removed. You will need to create your own private messaging system. Check the SA:MP Wiki or browse through the multiple released filterscripts on these forums that do the job.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)