---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, ©2005-2015 SA-MP Team [21:22:12] filterscripts = "" (string) [21:22:12] [21:22:12] Server Plugins [21:22:12] -------------- [21:22:12] Loading plugin: crashdetect.dll [21:22:12] CrashDetect v4.18.1 is OK. [21:22:12] Loaded. [21:22:12] Loading plugin: streamer.dll [21:22:12] *** Streamer Plugin v2.9.3 by Incognito loaded *** [21:22:12] Loaded. [21:22:12] Loaded 2 plugins. [21:22:12] [21:22:12] Filterscripts [21:22:12] --------------- [21:22:12] Loaded 0 filterscripts. [21:22:12] Stage 1 [21:22:12] Dynamic Radio System: Created a radio station: "ID 1", Name: 'Country Music' [21:22:12] Dynamic Radio System: Created a radio station: "ID 2", Name: 'Modern Hiphop' [21:22:12] Dynamic Radio System: Created a radio station: "ID 3", Name: 'Kiss FM' [21:22:12] Dynamic Radio System: Created a radio station: "ID 4", Name: 'DeJay R&B' [21:22:12] Dynamic Radio System: Created a radio station: "ID 5", Name: 'Hot 108 JamZ' [21:22:12] Dynamic Radio System: Created a radio station: "ID 6", Name: 'CroniX Agresstion' [21:22:12] Dynamic Radio System: Created a radio station: "ID 7", Name: 'Sky FM - Top Hitz' [21:22:12] Dynamic Radio System: Created a radio station: "ID 8", Name: 'HouseTime FM - Electro' [21:22:12] Dynamic Radio System: Created a radio station: "ID 9", Name: 'Smooth Jazz FM' [21:22:12] Dynamic Radio System: Created a radio station: "ID 10", Name: 'SlowRaDio FM' [21:22:12] Dynamic Radio System: Created a radio station: "ID 11", Name: 'Gay FM - Pure Dance' [21:22:12] Dynamic Radio System: Created a radio station: "ID 12", Name: 'TDI Radio - Dance' [21:22:12] Dynamic Radio System: Created a radio station: "ID 13", Name: '181.FM - The Buzz' [21:22:12] Stage 2 [21:22:13] Stage 3 [21:22:13] Stage 4 [21:22:13] Stage 5 [21:22:13] Stage 6 [21:22:13] Stage 7 [21:22:13] Stage 8 [21:22:13] Stage 8 [21:22:13] Stage 9 [21:22:13] Stage 10 [21:22:13] Stage 11 [21:22:13] [debug] Run time error 4: "Array index out of bounds" [21:22:13] [debug] Attempted to read/write array element at index 72 in array of size 72 [21:22:13] [debug] AMX backtrace: [21:22:13] [debug] #0 00379878 in public AddCar (72) from AZRP.amx [21:22:13] [debug] #1 00343d24 in public Iter_OnGameModeInit () from AZRP.amx [21:22:13] [debug] #2 native CallLocalFunction () from samp-server.exe [21:22:13] [debug] #3 00002bb0 in public OnGameModeInit () from AZRP.amx [21:22:13] [21:22:13] [21:22:13] AZ-RP v2.4 [21:22:13] ______________ [21:22:13] [21:22:13] Number of vehicle models: 81
forward AddCar(carcoords); public AddCar(carcoords)
//cut from script
print("Stage 11");
for(new i = 0; i < 165; i++)
{
AddCar(i);
}
print("Stage End");
return 1;
}
public LoadStuff()
{
new arrCoords[16][64];
new strFromFile2[256];
new File: file = fopen("stuff.ini", io_read);
if(file)
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
Jackpot = strvalEx(arrCoords[0]);
Tax = strvalEx(arrCoords[1]);
TaxValue = strvalEx(arrCoords[2]);
Security = strvalEx(arrCoords[3]);
Kicks = strvalEx(arrCoords[5]);
Fines = strvalEx(arrCoords[6]);
Prisons = strvalEx(arrCoords[7]);
Slaps = strvalEx(arrCoords[8]);
Bans = strvalEx(arrCoords[9]);
Jails = strvalEx(arrCoords[10]);
Spins = strvalEx(arrCoords[11]);
MaxPlayers = strvalEx(arrCoords[12]);
Reports = strvalEx(arrCoords[13]);
factionsrecentlypaid = strvalEx(arrCoords[14]);
factionpaytimer = strvalEx(arrCoords[15]);
fclose(file);
if(Security == 0 || Security == 1)
{
}
else
{
GameModeExit();
}
}
else
{
GameModeExit();
}
return 1;
}
|
@sew_sumi, sorry I haven't been scripting for a while so I've forgotten a lot of things, but how can I fix that problem?
@RogueDrifter, thanks heaps for your reply! I don't think that's the problem, although let me know if you see anything wrong with this Код:
public LoadStuff()
{
new arrCoords[16][64];
new strFromFile2[256];
new File: file = fopen("stuff.ini", io_read);
if(file)
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
Jackpot = strvalEx(arrCoords[0]);
Tax = strvalEx(arrCoords[1]);
TaxValue = strvalEx(arrCoords[2]);
Security = strvalEx(arrCoords[3]);
Kicks = strvalEx(arrCoords[5]);
Fines = strvalEx(arrCoords[6]);
Prisons = strvalEx(arrCoords[7]);
Slaps = strvalEx(arrCoords[8]);
Bans = strvalEx(arrCoords[9]);
Jails = strvalEx(arrCoords[10]);
Spins = strvalEx(arrCoords[11]);
MaxPlayers = strvalEx(arrCoords[12]);
Reports = strvalEx(arrCoords[13]);
factionsrecentlypaid = strvalEx(arrCoords[14]);
factionpaytimer = strvalEx(arrCoords[15]);
fclose(file);
if(Security == 0 || Security == 1)
{
}
else
{
GameModeExit();
}
}
else
{
GameModeExit();
}
return 1;
}
|