Some error help
#2

Quote:
Originally Posted by googamalugafoo
Посмотреть сообщение
Im trying to make a /up (amount) command again..
pawn Код:
CMD:up(playerid, params[])
 {
 if(IsPlayerLuxAdmin(playerid))
 new amount[12], str[128];
 new Float:X, Float:Y, Float:Z;
 GetPlayerPos(X,Y,Z);
 SetPlayerPos(playerid,X+%s,Y,Z);
 format(str,sizeof(str), "** Moved up %s feet.",amount);
 SendClientMessage(playerid,COL_ADMIN,str);
 return 1;
 )
Errors
pawn Код:
(359) : error 003: declaration of a local variable must appear in a compound block
(359) : error 017: undefined symbol "amount"
(359) : warning 215: expression has no effect
(359) : error 001: expected token: ";", but found "]"
(359) : fatal error 107: too many error messages on one line
Line 359
pawn Код:
new amount[12], str[128];
Reppin' for some help
Here you go
pawn Код:
CMD:up(playerid, params[])

{
    if ((IsPlayerLuxAdmin(playerid))
    {
        new Float:slx, Float:sly, Float:slz;
        GetPlayerPos(playerid, slx, sly, slz);
        SetPlayerPos(playerid, slx, sly, slz+2);
        return 1;
       
       
    }
    else
    {
        SendClientMessage(playerid, COLOR_GRAD1, "   You Are Not An Admin");
       
       
    }
    return 1;
   
}
Sorry for loose indentation see if it works,i edited this from my code.
Reply


Messages In This Thread
Some error help - by SnG.Scot_MisCuDI - 25.01.2012, 23:59
Re: Some error help - by Lilcuete - 26.01.2012, 00:50
Re: Some error help - by [ABK]Antonio - 26.01.2012, 00:50
Re: Some error help - by SnG.Scot_MisCuDI - 26.01.2012, 01:12
Re: Some error help - by [ABK]Antonio - 26.01.2012, 01:16
Re: Some error help - by SnG.Scot_MisCuDI - 26.01.2012, 01:22
Re: Some error help - by Tanush123 - 26.01.2012, 01:25
Re: Some error help - by [ABK]Antonio - 26.01.2012, 01:26
Re: Some error help - by Tanush123 - 26.01.2012, 01:29
Re: Some error help - by SnG.Scot_MisCuDI - 26.01.2012, 01:29

Forum Jump:


Users browsing this thread: 1 Guest(s)