CMD:setfreq(playerid, params[]) { new inputtext, frequency; if(sscanf(inputtext, u, frequency)) // <-- error 035: argument type mismatch (argument 1) In this Line { ShowPlayerDialog(playerid, DIALOG_TANSO, DIALOG_STYLE_INPUT, "Enter the frequency ", " frequency may be higher and lower than 9999999 -9999999! \ n HINT: Set up your frequency la 0, se ve radio default mode. ", "Choice ", " Cancel "); } return 1; }
CMD:setfreq(playerid, params[]) { new inputtext, frequency; if(sscanf(inputtext, u, frequency)) { ShowPlayerDialog(playerid, DIALOG_TANSO, DIALOG_STYLE_INPUT, "Nhap Tan So", "Tan so co the cao hon -9999999 va thap hon 9999999!\n HINT: Thiet lap tan so cua ban la 0 , radio se ve che do mac dinh.", "Lua chon", "Huy bo"); } return 1; }
if(sscanf(inputtext, "u", frequency))
if(sscanf(inputtext, "s", frequency)) //string
if(sscanf(inputtext, "i", frequency)) //number (0:inf)
if(sscanf(inputtext, "d", frequency)) //number (-inf:inf)
CMD:setfreq(playerid, params[]) { new inputtext, frequency; if(sscanf(inputtext, "i", frequency)) // <-- error 035: argument type mismatch (argument 1) In this Line again { ShowPlayerDialog(playerid, DIALOG_TANSO, DIALOG_STYLE_INPUT, "Enter the frequency ", " frequency may be higher and lower than 9999999 -9999999! \ n HINT: Set up your frequency la 0, se ve radio default mode. ", "Choice ", " Cancel "); } return 1; }
if(dialogid == DIALOG_TANSO) { if(response) { new frequency; if(frequency > 9999999 || frequency < -9999999) { return 1; } if (PlayerInfo[playerid][pRadio] == 1) { PlayerInfo[playerid][pRadioFreq] = frequency; format(string, sizeof(string), "you have been changed the frequency %s khz.",frequency); SendClientMessageEx(playerid, COLOR_WHITE, string); } } else SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have frequency !"); return 1; }
PHP код:
|
CMD:setfreq(playerid, params[])
{
new frequency;
if(!sscanf(params, "i", frequency))
{
ShowPlayerDialog(playerid, DIALOG_TANSO, DIALOG_STYLE_INPUT, "Enter the frequency ", " frequency may be higher and lower than 9999999 -9999999! \ n HINT: Set up your frequency la 0, se ve radio default mode. ", "Choice ", " Cancel ");
}
return 1;
}
PHP код:
|
Did you fix your code? If not, what are the errors and the lines?
|
CMD:setfreq(playerid, params[]) { new inputtext, frequency; if(sscanf(inputtext, "i", frequency)) // <-- error 035: argument type mismatch (argument 1) In this Line again { ShowPlayerDialog(playerid, DIALOG_TANSO, DIALOG_STYLE_INPUT, "Enter the frequency ", " frequency may be higher and lower than 9999999 -9999999! \ n HINT: Set up your frequency la 0, se ve radio default mode. ", "Choice ", " Cancel "); } return 1; }
Код:
CMD:setfreq(playerid, params[]) { new inputtext, frequency; if(sscanf(inputtext, "i", frequency)) // <-- error 035: argument type mismatch (argument 1) In this Line again { ShowPlayerDialog(playerid, DIALOG_TANSO, DIALOG_STYLE_INPUT, "Enter the frequency ", " frequency may be higher and lower than 9999999 -9999999! \ n HINT: Set up your frequency la 0, se ve radio default mode. ", "Choice ", " Cancel "); } return 1; } |
if(sscanf(params, "i", frequency))