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



: error 010: invalid function or declaration - Spartaaaaa - 29.07.2014

Код:
        if((gettime() - LastDeath[playerid]) <= 5)
        {
            SendClientMessage(playerid,0,"{0CFA00}UFS: You have been banned, for floodcheck {FFFFFF}www.ufs.createaforum.com");
            BanEx(playerid,"Banned for FakeKill Flood");
        }
       }else
        if((gettime() - LastDeath[playerid]) > 5)
        {
            XDeaths[playerid]=0;
        }
    }
    return 1;
}



Re: : error 010: invalid function or declaration - Battlezone - 29.07.2014

There is an extra bracket before else, i think


Re: : error 010: invalid function or declaration - Spartaaaaa - 29.07.2014

What i have to do now?


Re: : error 010: invalid function or declaration - Spartaaaaa - 29.07.2014

bump


Re: : error 010: invalid function or declaration - Blademaster680 - 29.07.2014

Код:
if((gettime() - LastDeath[playerid]) <= 5)
        {
            SendClientMessage(playerid,0,"{0CFA00}UFS: You have been banned, for floodcheck {FFFFFF}www.ufs.createaforum.com");
            BanEx(playerid,"Banned for FakeKill Flood");
        }
       else
        if((gettime() - LastDeath[playerid]) > 5)
        {
            XDeaths[playerid]=0;
        }
    }
    return 1;
}
Try that


Re: : error 010: invalid function or declaration - mjay768 - 29.07.2014

Add a curly brace above sendclientmessage!!!


Re: : error 010: invalid function or declaration - Blademaster680 - 29.07.2014

Quote:

Add a curly brace above sendclientmessage!!!

He hasnt shown all the code as you can see by the spaces... He could have a curly brace above the if statement. He has a closing curly brace by the else that is probably causing it


Re: : error 010: invalid function or declaration - mjay768 - 29.07.2014

Yep.. That's not the complete code!!! I just told to try!!! and spartaa before asking for help, Please post the complete code where the error occurred..


Re: : error 010: invalid function or declaration - Clad - 29.07.2014

You can't create title with the error name, You must provide details and make some effort and write and explain, Atleast, Post the error line.