SA-MP Forums Archive
invalid function or declaration - 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: invalid function or declaration (/showthread.php?tid=659210)



invalid function or declaration - AlfaSufaIndo - 27.09.2018

I got this error on Timer code
Код:
invalid function or declaration (4893, 1)
invalid function or declaration (4895, 1)
PHP код:
Timer:PlayerChecker[1000]() //4893
{
    foreach(new 
iPlayer//4895
    
{
        if(
pInfo[i][pMuted])
        {
            
pInfo[i][pMutedTime]--;
            if(
pInfo[i][pMutedTime] < 1)
            {
                
pInfo[i][pMuted] = false;
                
pInfo[i][pMutedTime] = 0;
                
SendClientMessage(iCOLOR_YELLOW"AdmCmd: You have been automatically unmuted after serving the mute-time.");
                new 
string[150];
                
format(stringsizeof(string), "AdmWarn: {FF0000}%s has been automatically unmuted after serving his mute-time"GetName(i));
                
SendAdminMessage(COLOR_ORANGEstring);
            }
        }
        if(
pInfo[i][pJailed])
        {
            
pInfo[i][pJailedTime]--;
            if(
pInfo[i][pJailedTime] < 1)
            {
                
pInfo[i][pJailed] = false;
                
pInfo[i][pJailedTime] = 0;
                
SendClientMessage(iCOLOR_YELLOW"AdmCmd: You have been automatically unjailed after serving the jail-time.");
                new 
string[150];
                
format(stringsizeof(string), "AdmWarn: {FF0000}%s has been automatically unjailed after serving his jail-time"GetName(i));
                
SendAdminMessage(COLOR_ORANGEstring);
            }
        }
    }
    return 
1;




Re: invalid function or declaration - solstice_ - 27.09.2018

One question, where have you got this script from? Because it's the same exact like mine..

PHP код:
Timer:PlayerChecker[1000]()
{
    foreach(
Playeri)
    {
        if(
PlayerInfo[i][pMuted] == true)
        {
            
PlayerInfo[i][pMutedTime]--;
            if(
PlayerInfo[i][pMutedTime] < 1)
            {
                
PlayerInfo[i][pMuted] = false;
                
PlayerInfo[i][pMutedTime] = 0;
                
SendClientMessage(iCOLOR_YELLOW"AdmCmd(1): You have been automatically unmuted after serving the mute-time.");
                new 
string[150];
                
format(stringsizeof(string), "AdmWarn(2): {FF0000}%s has been automatically unmuted after serving his mute-time"GetName(i));
                
SendAdminMessage(COLOR_ORANGEstring);
            }
        } 
Even the AdmWarnings are the same ffs.. Why do you keep copying other's script


Re: invalid function or declaration - AlfaSufaIndo - 27.09.2018

Quote:
Originally Posted by willbedie
Посмотреть сообщение
One question, where have you got this script from? Because it's the same exact like mine..

PHP код:
Timer:PlayerChecker[1000]()
{
    foreach(
Playeri)
    {
        if(
PlayerInfo[i][pMuted] == true)
        {
            
PlayerInfo[i][pMutedTime]--;
            if(
PlayerInfo[i][pMutedTime] < 1)
            {
                
PlayerInfo[i][pMuted] = false;
                
PlayerInfo[i][pMutedTime] = 0;
                
SendClientMessage(iCOLOR_YELLOW"AdmCmd(1): You have been automatically unmuted after serving the mute-time.");
                new 
string[150];
                
format(stringsizeof(string), "AdmWarn(2): {FF0000}%s has been automatically unmuted after serving his mute-time"GetName(i));
                
SendAdminMessage(COLOR_ORANGEstring);
            }
        } 
Even the AdmWarnings are the same ffs.. Why do you keep copying other's script
From your script.. WAdmin 1.0 I want to change the MYSQL_DATABASE. So I recompiled it.. but i got that error


Re: invalid function or declaration - solstice_ - 27.09.2018

Quote:
Originally Posted by AlfaSufaIndo
Посмотреть сообщение
From your script.. WAdmin 1.0 I want to change the MYSQL_DATABASE. So I recompiled it.. but i got that error
Oh shit I forgot I released my WAdmin system, I'm sorry lol.. So when you change the MYSQL_DATABASE it gives you that error? Are you sure you didn't change something else?


Re: invalid function or declaration - AlfaSufaIndo - 27.09.2018

Quote:
Originally Posted by willbedie
Посмотреть сообщение
Oh shit I forgot I released my WAdmin system, I'm sorry lol.. So when you change the MYSQL_DATABASE it gives you that error? Are you sure you didn't change something else?
Nahh bro... i just want to change MYSQL_DATABASE.. and i recompile it,, i got about 130 Errors & Warnings And I try to put it on my gamemode.. but failed.. and I try to remove Timer:PlayerChecker.. no Errors & Warnings


Re: invalid function or declaration - solstice_ - 27.09.2018

Show me the define of MYSQL_DATABASE


Re: invalid function or declaration - AlfaSufaIndo - 27.09.2018

Wait, i almost forgot... I can't find colors2.inc so i change some SendClientMessage colors


Re: invalid function or declaration - solstice_ - 27.09.2018

https://pastebin.com/fy1UryAP - Here's colors2.inc, can you show me the code of MYSQL_DATABASE?


Re: invalid function or declaration - AlfaSufaIndo - 27.09.2018




Re: invalid function or declaration - AlfaSufaIndo - 27.09.2018

Can I modify the code a little? of course I will put your name on my credits