About ZCMD
#1

Hello guys, i'm an old player and i decided to come back scripting since long, now i'm cofused with all these new coverting cmds things, i'm having alot of trouble with this cmd i made, as simple as that but i tried to made it ZCMD and i'm getting error, here it is

pawn Код:
CMD:enter(playerid, params[])
{
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 1368.9998,-1279.6885,13.5469))
        {
            SetPlayerPos(playerid, 317.1362,-167.2568,999.5938);//AmmunationEntrance
            SetPlayerFacingAngle(playerid, 16.1934);
            SetPlayerInterior(playerid, 6);
            GameTextForPlayer(playerid, "~y~ Welcome to AmmuNation", 500, 1);
        }
    }
    return 1;
}

CMD:exit(playerid, params[])
{
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 317.1362,-167.2568,999.5938))
        {
            SetPlayerPos(playerid, 1368.9998,-1279.6885,13.5469);//AmmunationExit
            SetPlayerInterior(playerid, 0);
        }
    }
    return 1;
}
it's a just a simple /enter and /exit cmd for my ammunation, somehow if i use strcmp to code and i add it as a FS it works, but my server gets buggy and none of my cmds work, only for this FS i make on strcmp, my GM is based on ZCMD as i'm still learning on it.

Anyways here are the errors i got :

Код:
C:\Users\Gilberto\Downloads\Alternative RP Test Server\filterscripts\AmmuSystem.pwn(1534) : error 010: invalid function or declaration
C:\Users\Gilberto\Downloads\Alternative RP Test Server\filterscripts\AmmuSystem.pwn(1534 -- 1547) : error 020: invalid symbol name ""
C:\Users\Gilberto\Downloads\Alternative RP Test Server\filterscripts\AmmuSystem.pwn(1534 -- 1549) : error 010: invalid function or declaration
C:\Users\Gilberto\Downloads\Alternative RP Test Server\filterscripts\AmmuSystem.pwn(1534 -- 1549) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
I'm just confused about the ZCMD and strcmp, ZCMD is kinda new to me and i can't seem to find any tutorial on it, so hope you can help me on this one.

Thanks
Reply
#2

Well if you looked closely at the code you will notice that you have an extra, "}", bracket.

Here you go, fixed the indentation for you aswell:
pawn Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 1368.9998,-1279.6885,13.5469))
    {
        SetPlayerPos(playerid, 317.1362,-167.2568,999.5938);//AmmunationEntrance
        SetPlayerFacingAngle(playerid, 16.1934);
        SetPlayerInterior(playerid, 6);
        GameTextForPlayer(playerid, "~y~ Welcome to AmmuNation", 500, 1);
    }
    return 1;
}

CMD:exit(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, 317.1362,-167.2568,999.5938))
    {
        SetPlayerPos(playerid, 1368.9998,-1279.6885,13.5469);//AmmunationExit
        SetPlayerInterior(playerid, 0);
    }
    return 1;
}
Sorry i don't have time to explain right now, but to be honest its not that hard..
Reply
#3

Thanks, but it's not about the brackets.. the error is at line 1534... wich is this one

pawn Код:
CMD:enter(playerid, params[])
Idk what the hell is going on with this line... anyways thanks for your help, i'll try to figure it out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)