how to find case's value
#1

PHP код:
CMD:setfreq(playerid,params[])
{
    if(
PlayerHasItem(playerid,"Statie Radio"))
    {
        new 
slotvaloare ,string[128];
        if(
sscanf(params"i"slotvalue)) return SendClientMessage(playerid,-1,""COL_RED"Cmds: /setfreq [Slot] [Freq]");
        switch(
slot)
        {
        case 
1pInfo[playerid][pRadioFreq1] = value;
        case 
2pInfo[playerid][pRadioFreq2] = value;
        case 
3pInfo[playerid][pRadioFreq3] = value;
        }
        
format(string,sizeof(string),""COL_RED"Cmds: You have changed slot number %i frequency at %i.",slotvalue);
        
SendClientMessage(playerid,-1,string);
    }
    else {
        
SendClientMessage(playerid,-1,""COL_RED"ERROR: Where's your radio?");
    } 
Known errors:
  • At server log it shows "sscanf warning: Format specifier does not match parameter count."
  • When I type /setfreq, any of pRadioFreq won't change. It remains at 0
Reply


Messages In This Thread
sscanf warning: Format specifier does not match parameter count. - by Zeus666 - 27.09.2018, 20:52
Re: how to find case's value - by GospodinX - 27.09.2018, 20:53
Re: how to find case's value - by Zeus666 - 27.09.2018, 20:55
Re: how to find case's value - by NaS - 27.09.2018, 20:55
Re: how to find case's value - by GospodinX - 27.09.2018, 20:58
Re: how to find case's value - by Zeus666 - 27.09.2018, 21:00
Re: how to find case's value - by GospodinX - 27.09.2018, 21:07
Re: how to find case's value - by Zeus666 - 27.09.2018, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)