Need help with Ban Command
#1

EDIT: Problem Solved, i just retyped the script and found the answer by my self :P

well, if anyone want to see my problem see below

Quote:
Originally Posted by problem
Hello All, this is my first post and also my first thread

this is my problem

im using this includes

pawn Код:
#include <sscanf2>
#include <foreach>
#include <YSI\y_commands>
#include <ysi/y_ini>
and i tried to make a ban command

pawn Код:
YCMD:ban(playerid, params[], help)
{
        #pragma unused help
        if(PlayerInfo[playerid][pLevel] < 4) return SCM(playerid, COLOR_YELLOW, "* Sorry, only Admins level 4+ can use Ban Command");
        new
            string[128],pplayerid, reason[48];
        if(sscanf(params, "us[48]", pplayerid, reason)) return SCM(playerid, COLOR_YELLOW, "* Usage: /ban <playerid> <reason>");
        if(pplayerid == IPI) return SCM(playerid, COLOR_RED, "Invalid Player id!");
        if(PlayerInfo[pplayerid][pLevel] > PlayerInfo[playerid][pLevel]) return SCM(playerid, COLOR_YELLOW, "* Sorry, but this Admin has a higher level than yours");
line 392 >      format(string,sizeof(string),""COLOR_RED"-Team SF [BAN]- %s has been banned by Admin %s for %s",GetName(pplayerid),GetName(playerid),reason);
        SCMTA(-1,string);
        Ban(pplayerid);
        return 1;
}
and a few defines

pawn Код:
#define IPI INVALID_PLAYER_ID
#define SCM SendClientMessage
#define SCMTA SendClientMessageToAll
and GetName stock

pawn Код:
stock GetName(playerid)
{
    new
        pName[MAX_PLAYER_NAME];

    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    return pName;
}
so when i tried to compile my script i got this errors

Код:
D:\SA-MP Server\gamemodes\Team SF.pwn(392) : error 001: expected token: "-string end-", but found "-identifier-"
D:\SA-MP Server\gamemodes\Team SF.pwn(392) : warning 215: expression has no effect
D:\SA-MP Server\gamemodes\Team SF.pwn(392) : error 001: expected token: ";", but found "-string-"
D:\SA-MP Server\gamemodes\Team SF.pwn(392) : warning 215: expression has no effect
D:\SA-MP Server\gamemodes\Team SF.pwn(392) : warning 215: expression has no effect
D:\SA-MP Server\gamemodes\Team SF.pwn(392) : error 001: expected token: ";", but found ")"
D:\SA-MP Server\gamemodes\Team SF.pwn(392) : fatal error 107: too many error messages on one line

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


4 Errors.
which me, myself couldn't fix it, so i came here to get the help,i tried many ways i've learned but still, i couldn't fix it :P

so please, help me , and afterall im new here
Reply


Messages In This Thread
Need help with Ban Command - by BlackID - 27.12.2011, 15:35
Re: Need help with Ban Command - by BlackID - 28.12.2011, 03:37
Re: Need help with Ban Command - by MP2 - 28.12.2011, 03:42
Re: Need help with Ban Command - by BlackID - 28.12.2011, 03:44
Re: Need help with Ban Command - by BlackID - 28.12.2011, 11:46
Re: Need help with Ban Command - by Mike_Peterson - 28.12.2011, 12:03
Re: Need help with Ban Command - by [MG]Dimi - 28.12.2011, 12:17
Re: Need help with Ban Command - by Jack_Rocker - 28.12.2011, 12:26
Re: Need help with Ban Command - by BlackID - 28.12.2011, 13:16
Re: Need help with Ban Command - by Mike_Peterson - 28.12.2011, 13:24

Forum Jump:


Users browsing this thread: 1 Guest(s)