public SaveData() { foreach(Player, x) { savePlayerData(x); } for(new xh = 0; xh < MAX_HOUSES; xh++) { saveHouse(xh); } for(new xf = 0; xf < MAX_GROUPS; xf++) { saveGroup(xf); } for(new xc = 0; xc < MAX_CLANS; xc++) { saveClan(xc); } for(new xf = 0; xf < MAX_BUSINESSES; xf++) { saveBusiness(xf); } for(new xf = 0; xf < MAX_ASSETS; xf++) { saveAsset(xf); } for(new ff = 0; ff < 999; ff++) { saveDealer(ff); } }
[01:41:01] [debug] Run time error 4: "Array index out of bounds" [01:41:01] [debug] Accessing element at index 612 past array upper bound 611 [01:41:01] [debug] AMX backtrace: [01:41:01] [debug] #0 0008e970 in ?? (612) from orion.amx [01:41:01] [debug] #1 00170180 in public SaveData () from orion.amx
#define MAX_HOUSES 69 #define MAX_GROUPS 69 #define MAX_CLANS 69 #define MAX_ASSETS (10) #define MAX_BUSINESSES 69
251 vehicle, 22 businesses, 41 houses, 1 player, 2 assets (total in the database).
#define MAX_ASSETS (10)
You're going through 999 on the last save?
PHP код:
|
Compile with -d3 flag: https://github.com/Zeex/samp-plugin-...ith-debug-info
Start the server and wait for SaveData to be called. Post the new logs. The problem is definitely in saveDealer as it's the only one with parameter value of 612. You probably have an array with size of 612 instead of 999 in that. |
Old 12/04/2016, 07:10 PM #1 danielpalade Big Clucker Join Date: Aug 2013 Posts: 169 Reputation: 1 Default What are these errors about? What are these errors? Code: C:\Program Files (x86)\Compiler\include\sscanf2.inc(305) : warning 218: old style prototypes used with optional semicolumns C:\Program Files (x86)\Compiler\include\sscanf2.inc(365) : warning 218: old style prototypes used with optional semicolumns C:\Program Files (x86)\Compiler\include\YSI\y_debug.inc(395) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_debug.inc(395) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(393) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(393) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(437) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(437) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(658) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(658) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(958) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(958) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(966) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_amx.inc(966) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(198) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(198) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(227) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(227) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(228) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(228) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(239) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(239) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(249) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(249) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(255) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(255) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(274) : error 036: empty statement C:\Program Files (x86)\Compiler\include\YSI\y_hooks/impl.inc(274) : error 036: empty statement