24.04.2015, 19:16
Код HTML:
[22:07:56] [debug] Run time error 4: "Array index out of bounds" [22:07:56] [debug] Accessing element at negative index -400 [22:07:56] [debug] AMX backtrace: [22:07:56] [debug] #0 000223ec in public OnDialogResponse () from LTGRP.amx
Код:
new String[128]; format(String, sizeof(String), "{94CB80}• Pardavėte transportą {ff0000}%s {94CB80}uћ {ff0000}%sЂ{94CB80}.", VehicleNames[GetVehicleModel(vehicleid) - 400], FormatuotiSkaicius(MoneyCount)); SendClientMessage(playerid, -1, String);
Код HTML:
stock FormatuotiSkaicius(Number)
{
new String[128];
format(String, sizeof(String), "%d", Number);
if(-1000 < Number < 1000) return String;
new Minus = 0;
if(Number < 0) Minus = 1;
new Length = strlen(String);
while((Length -= 3) > Minus) strins(String, ",", Length);
return String;
}