[SOLVED]Compiling 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: [SOLVED]Compiling Error (
/showthread.php?tid=117665)
[SOLVED]Compiling Error -
[WSM]Deadly_Evil - 01.01.2010
can anybody tell me what this error means?
Код:
F:\Server\gamemodes\W-S-M.pwn(402) : error 004: function "MMsgx" is not implemented
I have added:
On the Line of public OnGameModeInit()
Код:
public MMsgx()
{
SendClientMessageToAll(COLOR_GREY, MMsgs[random(sizeof(MMsgs))]);
return 1;
}
Also i added Forward
and new Also
Код:
new MMsgs[][] =
{
"Aao aks oak oaa Oe kar aao",
"Wao noy aba es Admino ? Applo ut www.****.com"
;
EDIT: I just add new msgs system no need of No Compile Error
Re: Compiling Error -
KnooL - 01.01.2010
Where did you but the public and where did you put the forward of that public?
Re: Compiling Error -
Puffmac - 01.01.2010
You've defined the function, but haven't actually used it. From your code, i presume you are trying to get random messages. If so, add the following line to the OnGameModeInit() callback:
pawn Код:
SetTimer("MMsgx",60000,1);
That will display a random message every 60 seconds.
Re: Compiling Error -
KnooL - 01.01.2010
Quote:
Originally Posted by Puffmac
You've defined the function, but haven't actually used it. From your code, i presume you are trying to get random messages. If so, add the following line to the OnGameModeInit() callback:
pawn Код:
SetTimer("MMsgx",60000,1);
That will display a random message every 60 seconds.
|
if I put it on my gm without the timer, it works. So it has nothing to do with that.
Re: Compiling Error -
Puffmac - 01.01.2010
How can it work without a timer? MMsgx isn't a native callback. Please, do explain that to me.
Anyway, I've checked the Pawn manual:
Quote:
function name is not implemented
There is no implementation for the designated function. The
function may have been “forwardly” declared —or prototyped—
but the full function definition including a statement, or statement
block, is missing.
|
Which in essence, in case you don't understand the language used in the manual, means that you have forwarded the function, but have not actually defined it.
I have tried to recreate this error, but can't seem to do so.