Need help with my commands
#9

Quote:
Originally Posted by Namer
Посмотреть сообщение
wrong this will show errors as you are missing a braket

pawn Код:
IRCCMD:getinfo(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
        new
            msg[128],
            playerid,
            name[MAX_PLAYER_NAME],
            Float:health,
            Float:armour,
            ip[16],
            score,
        ;

        if (sscanf(params, "u", playerid)) return 1;
        if (!IsPlayerConnected(playerid)) return 1;
        GetPlayerName(playerid , name , sizeof(name));
        GetPlayerIP(playerid, ip, sizeof(ip));
        GetPlayerHealth(playerid, health);  
        GetPlayerArmour(playerid, armour);
        format(msg, sizeof(msg), "Name: %s | IP: %s | Score: %d | Ping: %i | Health: %i | Armour: %i ",name, ip, GetPlayerScore(playerid), GetPlayerPing(playerid),ping, health, armour); //Line 508
        IRC_GroupSay(groupID, channel, msg);
    }
    return 1;
}

IRCCMD:force(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
        new msg[128], reason[128],playerid;
        if(sscanf(params, "us[128]", playerid,reason)) return 1;
        if(!IsPlayerConnected(playerid)) return 1;
        format(msg, sizeof(msg), "%s has been forced to go into class selection screen by admin %s | Reason: %s" GetName(playerid), user, reason);
        IRC_GroupSay(groupID, channel, msg), SendClientMessageToAll(0xDDDD2357, msg);
        ForceClassSelection(playerid);
    }
    return 1;
}
Okay, it still have some errors but i managed to fix them.
But now, i still have these warnings, is that ok?
Код:
E:\Samp Server\SAMP SERVER\filterscripts\irc.pwn(477) : warning 204: symbol is assigned a value that is never used: "tmp"
E:\Samp Server\SAMP SERVER\filterscripts\irc.pwn(507) : warning 202: number of arguments does not match definition
E:\Samp Server\SAMP SERVER\filterscripts\irc.pwn(521) : warning 202: number of arguments does not match definition
E:\Samp Server\SAMP SERVER\filterscripts\irc.pwn(521) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.
And what if i want to add message "Player not found"? i dont know which line checks for the player ID.


Thanks for all your help
Reply


Messages In This Thread
Need help with my commands - by YahyaBR - 28.03.2015, 06:41
Re: Need help with my commands - by oliverrud - 28.03.2015, 08:04
Re: Need help with my commands - by YahyaBR - 28.03.2015, 08:29
Re: Need help with my commands - by Juvanii - 28.03.2015, 09:11
Re: Need help with my commands - by YahyaBR - 28.03.2015, 09:33
Re: Need help with my commands - by oliverrud - 28.03.2015, 09:37
Re: Need help with my commands - by Juvanii - 28.03.2015, 09:49
Re: Need help with my commands - by JeaSon - 28.03.2015, 12:30
Re: Need help with my commands - by YahyaBR - 28.03.2015, 15:34

Forum Jump:


Users browsing this thread: 1 Guest(s)