SA-MP Forums Archive
MoveObject +rep! - 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: MoveObject +rep! (/showthread.php?tid=328645)



MoveObject +rep! - Gooday - 25.03.2012

pawn Код:
CMD:opengate(playerid, params[]);
{
        MoveObject(gate1, -505.29998779,2599.60009766,54.29999924,0.00000000,0.00000000,16.00000000, 2);
        MoveObject(gate, -505.29998779,2586.00000000,54.29999924,0.00000000,0.00000000,16.00000000, 2);
        SendClientMessage(playerid, 0xB4B5B7FF, "TutGate Opened");
        return 1;
    }
I got these errors

Quote:

C:\Users\Luca\Desktop\APRP GM\Server209 - Copia\gamemodes\ccrp.pwn(310 : error 055: start of function body without function header
C:\Users\Luca\Desktop\APRP GM\Server209 - Copia\gamemodes\ccrp.pwn(3112) : error 010: invalid function or declaration

+REP if fix!


AW: MoveObject +rep! - Drebin - 25.03.2012

How the hell to you expect us to fix the errors without showing which line is which error?!
Anyway,
pawn Код:
CMD:opengate(playerid, params[])
{
[...]
}



Re: MoveObject +rep! - ReneG - 25.03.2012

Might wanna learn to use ZCMD before making your own commands. I noticed you added a semicolon after
pawn Код:
CMD:opengate(playerid,params[])
which makes absolutely no sense at all.


Re: MoveObject +rep! - Twisted_Insane - 25.03.2012

They're right, you NEVER need a semicolon at the end of your commands in ZCMD, simply do the following:

pawn Код:
CMD:opengate(playerid, params[])
{
        MoveObject(gate1, -505.29998779,2599.60009766,54.29999924,0.00000000,0.00000000,16.00000000, 2);
        MoveObject(gate, -505.29998779,2586.00000000,54.29999924,0.00000000,0.00000000,16.00000000, 2);
        SendClientMessage(playerid, 0xB4B5B7FF, "TutGate Opened");
        return 1;
}
And indent your code!