More sscanf help
#7

pawn Код:
COMMAND:muteplayer(playerid, params[])
{
    new MuteReason[128], String[128], Player;
    if(sscanf(params, "uS[128]", Player, MuteReason)) {
        SendClientMessage(playerid, c_white, "[USAGE] /MutePlayer [Player ID] [Mute Reason (optional)]");
        return 1;
    }
    SetPVarInt(Player, "Muted", 1);
    if(isnull(MuteReason)) {
        format(String, sizeof(String), "You have been muted by Administrator %s, Reason: No Reason Specified.", pName(playerid));
        return 1;
    }
    else {
        format(String, sizeof(String), "You have been muted by Administrator %s, Reason: \"%s\"", pName(playerid), MuteReason);
    }
    SendClientMessage(playerid, c_white, String);
    return 1;
}
Doesn't work, and spams me with:

Quote:

Console input: reloadfs sPAdmin
[18:10:55] Filter script 'sPAdmin.amx' unloaded.
[18:10:55]
[18:10:55] [+] Filterscript "sPAdmin" has been initiated.
[18:10:55]
[18:10:55] [-] Filterscript Version: 0.1
[18:10:55] [-] Filterscript Author: Skylar Paul
[18:10:55]
[18:10:55] [+] Setting up your gamemode..
[18:10:55]
[18:10:55] [-] Game Mode Text set to "v0.1a"
[18:10:55] [-] Server Name set to "Change this!"
[18:10:55] [-] 0 Pickup(s) loaded from "Pickups.txt"
[18:10:55] [-] 0 Vehicle(s) loaded from "Vehicles.txt"
[18:10:55] [-] 0 Label(s) loaded from "Labels.txt"
[18:10:55] [-] 1 Map Icon(s) loaded from "MapIcons.txt"
[18:10:55]
[18:10:55] [+] Your Game Mode has been set up successfully.
[18:10:55]
[18:10:55] [-] Server has been started!
[18:10:55] [-] Date: [04/15/2011] | Time: [18:10]
[18:10:55]
[18:10:55] Filterscript 'sPAdmin.amx' loaded.
[18:11:00] sscanf warning: No default value found.
[18:11:00] sscanf warning: Unknown format specifier '[', skipping.
[18:11:00] sscanf warning: Unknown format specifier '1', skipping.
[18:11:00] sscanf warning: Unknown format specifier '2', skipping.
[18:11:00] sscanf warning: Unknown format specifier '8', skipping.
[18:11:00] sscanf warning: Unknown format specifier ']', skipping.
[18:11:00] sscanf warning: Format specifier does not match parameter count.

Reply


Messages In This Thread
More sscanf help - by Skylar Paul - 15.04.2011, 19:40
Re: More sscanf help - by aircombat - 15.04.2011, 19:59
Re: More sscanf help - by Skylar Paul - 15.04.2011, 20:16
Re: More sscanf help - by Calgon - 15.04.2011, 20:18
Re: More sscanf help - by xir - 15.04.2011, 20:23
Re: More sscanf help - by Skylar Paul - 15.04.2011, 20:52
Re: More sscanf help - by Skylar Paul - 15.04.2011, 22:11
Re: More sscanf help - by Calgon - 16.04.2011, 09:55
Re: More sscanf help - by Finn - 16.04.2011, 10:44
Re: More sscanf help - by playbox12 - 16.04.2011, 11:07

Forum Jump:


Users browsing this thread: 1 Guest(s)