31.07.2011, 22:22
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)"
Look at my "/veh" command:
I changed [3500] to [2500].
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++)
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");
}