return as invalid command
#9

It's a problem with the new version of sa-mp server. I had a command /v that worked perfectly (With a loop, using Loop(x, y) {} ) , and with the new versions, it returned as Unknown Command. I fixed it now.

The real problem is: The new version of sa-mp has a LOWER limit of the size of the string. I lowed the number and it worked

and also, can we see the "Loop" macro, I have a Loop macro too, but it's different, my Loop usage is: "Loop(x, max)"

pawn Код:
#define Loop(%0,%1) for(new %0; %0 < %1; %0++)
Look at my "/veh" command:

pawn Код:
if(!strcmp(cmd, "/veh"))
{
    if(GetPlayerScore(playerid) < 3) return MessaggioTradotto(playerid, 0xFF0000FF, "Devi essere almeno al livello 3 per usare questo comando!", "You must be at least level 3 to use this command!");
    new string[2500]; // This was 3500 before
    new string2[51];
    Loop(i, sizeof(GTA_CarNames))
    {
        format(string2, 51, GTA_CarNames[i]);
        format(string, sizeof(string), "%s%s\n", string, string2);
    }
    ShowPlayerDialog(playerid, DIALOGO_SCELTA_AUTO,DIALOG_STYLE_LIST, "Seleziona un veicolo - Select a vehicle", string, "OK", "Cancel");
}
I changed [3500] to [2500].
Reply


Messages In This Thread
return as invalid command - by Unknown123 - 31.07.2011, 21:26
Re: return as invalid command - by Jefff - 31.07.2011, 22:02
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:07
Re: return as invalid command - by Jefff - 31.07.2011, 22:09
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:14
Re: return as invalid command - by Jefff - 31.07.2011, 22:16
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:17
Re: return as invalid command - by Jefff - 31.07.2011, 22:19
Re: return as invalid command - by Sasino97 - 31.07.2011, 22:22
Re: return as invalid command - by Jefff - 31.07.2011, 22:29
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:39
Re: return as invalid command - by Jefff - 31.07.2011, 22:45
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:47
Re: return as invalid command - by Jefff - 31.07.2011, 22:50
Re: return as invalid command - by Unknown123 - 31.07.2011, 22:55
Re: return as invalid command - by Jefff - 31.07.2011, 23:01

Forum Jump:


Users browsing this thread: 3 Guest(s)