SA-MP Forums Archive
[help] GATE - 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: [help] GATE (/showthread.php?tid=262771)



[help] GATE - decastro96 - 19.06.2011

PHP код:
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}
#endif
new gate;
public 
OnGameModeInit()
{
    
// Don't use these lines if it's a filterscript
    
SetGameModeText("Blank Script");
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
    
gate  =   CreateObject(980,785.68078613,-1152.40832520,25.42964172,0.00000000,0.00000000,272.00000000); //object(airportgate) (2)
    
return 1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    {
    if (!
strcmp("/Closegate"cmdtext))
    {
        if(
IsPlayerInRangeOfPoint(playerid7.0785.68078613,-1152.40832520,25.42964172))
        {
        
MoveObject(gate785.68078613,-1152.40832520,25.429641721);
        }
        return 
1;
    }
    if (!
strcmp("/Opengate"cmdtext))
    {
        if(
IsPlayerInRangeOfPoint(playerid7.0785.68078613,-1152.40832520,19.67964172))
        {
        
MoveObject(gate785.68078613,-1152.40832520,19.67964172,  1);
        }
        return 
2;
    } 
what wrong C:\Users\extro\Desktop\decastro\filterscripts\allg ate.pwn(61) : error 030: compound statement not closed at the end of file (started at line 43)


Re: [help] GATE - alpha500delta - 19.06.2011

Well, you added too many brackets, and 2, you can't return 2 I do believe.


Re: [help] GATE - decastro96 - 19.06.2011

can you fix it?