Error: unknown command
#1

Hey, when I try to run the commands, I simply get "Error: unknown command" like it doesn't exists, anyone ?
PHP код:
CMD:editarray(playerid)
{
    new 
string[((0x7FFFFFFF) + 2) * 10];
    for(new 
1<= sizeof(Array); i++) format(stringsizeof(string), "%sArray[%d] = %d\n"stringi, Array[i]);
    
ShowPlayerDialog(playeridDIALOG_ARRAYDIALOG_STYLE_LIST"Edit the array as you wish:"string"Edit""Cancel");
    return 
1;
}
//
CMD:sortarray(playerid)
{
    new 
tempcount;
    for(new 
0sizeof(Array); i++)
    {
        if(Array[
i] > Array[i+1])
        {
            
temp = Array[count];
            Array[
count++] = Array[i];
            Array[
i] = temp;
        }
    }
    return 
1;
}
//
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_ARRAY:
        {
            if(
response)
            {
                new 
string[10];
                
format(stringsizeof(string), "Array[%d] edition:"listitem);
                
SetPVarInt(playerid"cell"listitem);
                
ShowPlayerDialog(playeridDIALOG_EDITDIALOG_STYLE_INPUTstring"Type in a number.""Okay""Cancel");
            }
            else 
SendClientMessage(playerid, -1"You have decided to abort the array edition.");
        }
        case 
DIALOG_EDIT:
        {
            if(
response)
            {
                new 
string[((0x7FFFFFFF) + 2) * 10];
                Array[
GetPVarInt(playerid"cell")] = strval(inputtext);
                
SendClientMessage(playerid, -1"You have edited a number in the array, this is the refreshed one.");
                for(new 
1<= sizeof(Array); i++) format(stringsizeof(string), "%s%d\n"string, Array[i]);
                
ShowPlayerDialog(playeridDIALOG_ARRAYDIALOG_STYLE_LIST"Edit the array as you wish:"string"Edit""Cancel");
            }
            else
            {
                
DeletePVar(playerid"cell");
                
SendClientMessage(playerid, -1"You have aborted the array edition.");
            }
        }
    }
    return 
0;

Reply


Messages In This Thread
Error: unknown command - by NeXoR - 01.10.2016, 15:44
Re: Error: unknown command - by Konstantinos - 01.10.2016, 15:50
Re: Error: unknown command - by ActionTanki91 - 01.10.2016, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)