SA-MP Forums Archive
invalid function or declaration and Prototype Help Please :C - 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 and Prototype Help Please :C (/showthread.php?tid=326333)



invalid function or declaration and Prototype Help Please :C - aznpro12345 - 17.03.2012

Ok im noob at scripting and this keeps happening to my script when ever i compile it
(Compile Thingy)
C:\Users\Unknown\Desktop\Grand Theft Auto San Andreas\Roleplay\gamemodes\rp.pwn(6317) : error 010: invalid function or declaration
C:\Users\Unknown\Desktop\Grand Theft Auto San Andreas\Roleplay\gamemodes\rp.pwn(6321) : error 010: invalid function or declaration
C:\Users\Unknown\Desktop\Grand Theft Auto San Andreas\Roleplay\gamemodes\rp.pwn(6323) : error 010: invalid function or declaration
C:\Users\Unknown\Desktop\Grand Theft Auto San Andreas\Roleplay\gamemodes\rp.pwn(6327) : error 010: invalid function or declaration


(Pawno Code)
6316|}
6317| if(strcmp(cmd, "/opengate, true) == 0) {
6318|{
6319| MoveObject(Gate, 1590, -1638, 8.8999996185303, 1);
6320| // That will move our gate at relatively low speed: 3
6321| return 0;
6322|}
6323| if(strcmp(cmd, "/closegate, true) == 0) {
6324|{
6325| MoveObject(Gate, 1590, -1638, 15.199999809265, 1);
6326| // That will move our gate at relatively low speed: 3
6327| return 0;
6328|}
PLEASE HELP :C IM VERY NOOB


Re: invalid function or declaration and Prototype HELP :C PLEASE! - Mark™ - 17.03.2012

pawn Код:
if(strcmp(cmd, "/opengate", true) == 0)

{
    MoveObject(Gate, 1590, -1638, 8.8999996185303, 1);
    // That will move our gate at relatively low speed: 3
    return 1;
}
    if(strcmp(cmd, "/closegate", true) == 0)
{
    MoveObject(Gate, 1590, -1638, 15.199999809265, 1);
    // That will move our gate at relatively low speed: 3
    return 1;
}
You missed ending quotes.


Re: invalid function or declaration and Prototype HELP :C PLEASE! - aznpro12345 - 17.03.2012

Thanks


Re: invalid function or declaration and Prototype Help Please :C - DarkScripter - 17.03.2012

pawn Код:
if(strcmp(cmd, "/opengate", true) == 0)
{
MoveObject(Gate, 1590, -1638, 8.8999996185303, 1);
// That will move our gate at relatively low speed: 3
return 1;
}
if(strcmp(cmd, "/closegate", true) == 0)
{
MoveObject(Gate, 1590, -1638, 15.199999809265, 1);
// That will move our gate at relatively low speed: 3
return 1;
}
@Edit, sorry, the user reply very faast!


Re: invalid function or declaration and Prototype Help Please :C - aznpro12345 - 17.03.2012

I Tried Both And They Both Didnt Work :CC Hard Scripting And Making Gates Move SAD :CCCCCC

Thanks Though


Re: invalid function or declaration and Prototype Help Please :C - DarkScripter - 17.03.2012

you post the full script..


Re: invalid function or declaration and Prototype Help Please :C - aznpro12345 - 17.03.2012

Quote:
Originally Posted by DarkScripter
Посмотреть сообщение
you post the full script..
I fixed it, it's fine now thanks for the help