SA-MP Forums Archive
[HELP] 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] error 010: invalid function or declaration (/showthread.php?tid=187403)



[HELP] error 010: invalid function or declaration - Blatnoi - 02.11.2010

Errors:
Quote:

G:\FreshGE(Samod) V2.0\gamemodes\rtprp2.pwn(31331) : error 010: invalid function or declaration
G:\FreshGE(Samod) V2.0\gamemodes\rtprp2.pwn(31333) : error 010: invalid function or declaration
G:\FreshGE(Samod) V2.0\gamemodes\rtprp2.pwn(3133 : error 054: unmatched closing brace ("}")

code
Код:
if (IsPlayerInRangeOfPoint( playerid, 15, 1589.053344, -1638.123168, 14.122960))
		    {
            	if( Player[playerid][Group] == 1)
                {
      		    MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
      		    SetTimer("GateClose", 12000, 0);
      		   
		        }
		    }



Re: [HELP] error 010: invalid function or declaration - Miguel - 02.11.2010

For fuck sake, can you tell us WHERE those lines are, please?


Re: [HELP] error 010: invalid function or declaration - Mean - 02.11.2010

Did you enum of whatever you did in this if(Player
and try to delete all spaces
BTW use SetTimerEx


Re: [HELP] error 010: invalid function or declaration - Luis- - 02.11.2010

pawn Код:
if (IsPlayerInRangeOfPoint( playerid, 15, 1589.053344, -1638.123168, 14.122960))
{
    if( Player[playerid][Group] == 1)
    {
        MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
        SetTimer("GateClose", 12000, 0);
    }
}



Re: [HELP] error 010: invalid function or declaration - Blatnoi - 02.11.2010

Quote:
Originally Posted by -Luis
Посмотреть сообщение
pawn Код:
if (IsPlayerInRangeOfPoint( playerid, 15, 1589.053344, -1638.123168, 14.122960))
{
    if( Player[playerid][Group] == 1)
    {
        MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
        SetTimer("GateClose", 12000, 0);
    }
}
thanx
Quote:

G:\FreshGE(Samod) V2.0\gamemodes\rtprp2.pwn(3133 : error 054: unmatched closing brace ("}")

this error got fixed
Quote:

G:\FreshGE(Samod) V2.0\gamemodes\rtprp2.pwn(31331) : error 010: invalid function or declaration

but i still have this error left : |


Quote:

Did you enum of whatever you did in this if(Player

Thanx for the tip but i'm just making my first steps into samp scripting my knowlage is more then poor at the moment
so it would be real helpfull for me if you tell me how do i enum ? (p.s. to be honest i don't even know what enum is )


Re: [HELP] error 010: invalid function or declaration - Blatnoi - 03.11.2010

UPP is it so hard to help me people ?
if you need some more info just tell me


Re: [HELP] error 010: invalid function or declaration - Mean - 03.11.2010

pawn Код:
enum Info
{
   Group, // whatever info you wanna use, you can put for example Rank or anything
   //Add more here if you want
}
new Player[MAX_PLAYERS][Info];
Thats basically it
Add it where you add new functions (above main() function)
and BTW, now don't use == twice use it just on‌ce =


Re: [HELP] error 010: invalid function or declaration - WillyP - 03.11.2010

pawn Код:
if (IsPlayerInRangeOfPoint( playerid, 15, 1589.053344, -1638.123168, 14.122960))
            {
                if( Player[playerid][Group] == 1)
                {
                MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
                SetTimer("GateClose", 12000, 0);
               
                }
                        return 1;
            }



Re: [HELP] error 010: invalid function or declaration - Rafa - 03.11.2010

do u have created callbacks and forward that :/


Re: [HELP] error 010: invalid function or declaration - Bessensap - 03.11.2010

@ mean, u dont have to use SetTimerEx, because he doesnt have to send any values or things with the timer, he only needs to activate it.


Re: [HELP] error 010: invalid function or declaration - Blatnoi - 03.11.2010

thanx all but nothing helped me ..
the thing i'm trying to do is add automatic gates from bloodz rp into retrox

the code in first post is added in the end of the script... maybe i need to add this into separated place
p.s.
i have searched automatic gate tutorial on this forum and also on wiki .. there are to many of them...
i would like to know wich one is best ... because if this code won't work i would try to try another method


Re: [HELP] error 010: invalid function or declaration - Blatnoi - 04.11.2010

which is the best way to create automatic gates ? ( in my situation for rxrp)