SA-MP Forums Archive
Error 004: function not implemented - 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)
+--- Thread: Error 004: function not implemented (/showthread.php?tid=557973)



[NOT SOLVED]Error 004: function not implemented - CalvinC - 15.01.2015

Both of the SendAdminMessage functions are returning error 004, i have a 3rd SendAdminMessage(not visible below), but that doesn't return any errors.
pawn Код:
Removed
What does that mean?


Re: Error 004: function not implemented - CodyHawkins - 16.01.2015

Do you have any other line (stock) for "SendAdminMessage"?


Re: Error 004: function not implemented - Ironboy - 16.01.2015

It might be a problem in the stock.


Re: Error 004: function not implemented - ATGOggy - 16.01.2015

Show the SendAdminMessage stock


Re: Error 004: function not implemented - CalvinC - 16.01.2015

Oh yeah sorry i forgot.
pawn Код:
stock SendAdminMessage(rank, color, string[])
{
    foreach(Player, i)
    {
        if(PlayerInfo[i][Admin] >= rank) SendClientMessage(i, color, string);
    }
    return 1;
}
Pretty simple one.


Re: Error 004: function not implemented - Kimossab - 16.01.2015

have you put that stock function after calling for it? I mean you have first the pucli onplayertext and only then you create the SendAdminMessage stock? If yes then put it before.


Re: Error 004: function not implemented - CalvinC - 16.01.2015

Thanks for the help Kimossab. I had it set up like this:
Defines
Publics
Stocks
Commands

And it always worked, but now i have to switch the stocks above the publics?
Well anyways, thanks.


Re: Error 004: function not implemented - Kimossab - 16.01.2015

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
Thanks for the help Kimossab. I had it set up like this:
Defines
Publics
Stocks
Commands

And it always worked, but now i have to switch the stocks above the publics?
Well anyways, thanks.
Well I'm not sure in pawn since I never actually tested it, but, in most languanges, if you make a function yourself then you need to create it before using it. For example, you created that function and were trying to call it, though you only created further in the code. Basically most compilers will give that sort of errors because it wasn't created before. I can't really explain it very well, but let's go for a simpler example, using a variable before declaring it, it's basically the same mistake here.

You're welcome.


Re: Error 004: function not implemented - CalvinC - 16.01.2015

Yes i know, that's how it is in pawn too, but it didn't have to be with stocks before, only variables.