02.01.2015, 04:25
Hello guys I have a problems with my admin system too much
first before this I used to many string (new string[50]) so I decide to changed it be static string[50]; (make it global variable to all whole scripts) and when I compiled it this is result in first time when I used to create string before
and when I optimized my code to changed new string be static for scripts this is result
but when I launched server with crashdetect after 5 min passed I got this error
Can someone tell me plz how to make its not crash
note : I Already read ****** about string 256 size already and all of my static string its just [50] its most
this is my static define
All of CMD I used ZCMD at all
and I have dini floatset at
someone help me plz I gotta mad with it T_T and when I make static string decrease to like [40] or [32] its show heap overflow runtime error 8 so I decide to use at [50]
sorry with my bad grammar in English T_T
first before this I used to many string (new string[50]) so I decide to changed it be static string[50]; (make it global variable to all whole scripts) and when I compiled it this is result in first time when I used to create string before
pawn Код:
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 6752 bytes
Code size: 290680 bytes
Data size: 731420 bytes
Stack/heap size: 16384 bytes; estimated max. usage=3085 cells (12340 bytes)
Total requirements: 1045236 bytes
pawn Код:
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 10176 bytes
Code size: 288472 bytes
Data size: 283944 bytes
Stack/heap size: 16384 bytes; estimated max. usage=2011 cells (8044 bytes)
Total requirements: 598976 bytes
pawn Код:
[11:53:30] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:30] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49550
[11:53:30] [debug] AMX backtrace:
[11:53:30] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:36] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:36] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49604
[11:53:36] [debug] AMX backtrace:
[11:53:36] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:39] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:39] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49604
[11:53:39] [debug] AMX backtrace:
[11:53:39] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:41] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:41] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x496A4
[11:53:41] [debug] AMX backtrace:
[11:53:41] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:46] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:46] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49744
[11:53:46] [debug] AMX backtrace:
[11:53:46] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:48] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:48] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49764
[11:53:48] [debug] AMX backtrace:
[11:53:48] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:51] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:51] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49764
[11:53:51] [debug] AMX backtrace:
[11:53:51] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:52] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:52] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x497F8
[11:53:52] [debug] AMX backtrace:
[11:53:52] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:53] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:53] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x4981C
[11:53:53] [debug] AMX backtrace:
[11:53:53] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:56] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:56] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49818
[11:53:56] [debug] AMX backtrace:
[11:53:56] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:53:57] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:53:57] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49898
[11:53:57] [debug] AMX backtrace:
[11:53:57] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:00] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:00] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49898
[11:54:00] [debug] AMX backtrace:
[11:54:00] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:01] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:01] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49898
[11:54:01] [debug] AMX backtrace:
[11:54:01] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:02] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:02] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49898
[11:54:02] [debug] AMX backtrace:
[11:54:02] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:03] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:03] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49938
[11:54:03] [debug] AMX backtrace:
[11:54:03] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:03] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:03] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49938
[11:54:03] [debug] AMX backtrace:
[11:54:03] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:08] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:08] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x499D0
[11:54:08] [debug] AMX backtrace:
[11:54:08] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:09] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:09] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x499E8
[11:54:09] [debug] AMX backtrace:
[11:54:09] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:10] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:10] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x499D0
[11:54:10] [debug] AMX backtrace:
[11:54:10] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:13] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:13] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49A68
[11:54:13] [debug] AMX backtrace:
[11:54:13] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:19] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:19] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49B1C
[11:54:19] [debug] AMX backtrace:
[11:54:19] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:24] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:24] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49BBC
[11:54:24] [debug] AMX backtrace:
[11:54:24] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:29] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:29] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49C70
[11:54:29] [debug] AMX backtrace:
[11:54:29] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:35] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:35] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49D24
[11:54:35] [debug] AMX backtrace:
[11:54:35] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:40] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:40] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49DC4
[11:54:40] [debug] AMX backtrace:
[11:54:40] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:45] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:45] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49E64
[11:54:45] [debug] AMX backtrace:
[11:54:45] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:50] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:50] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49EFC
[11:54:50] [debug] AMX backtrace:
[11:54:50] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:54:56] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:54:56] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x49FB0
[11:54:56] [debug] AMX backtrace:
[11:54:56] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:55:01] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:55:01] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x4A050
[11:55:01] [debug] AMX backtrace:
[11:55:01] [debug] #0 00000008 in Float:operator+(Float:,_:) (Float:oper1=0.00000, oper2=0) at D:\VMP\pawno\include\float.inc:239
[11:55:06] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[11:55:06] [debug] Stack pointer (STK) is 0x4951C, heap pointer (HEA) is 0x4A104
[11:55:12] [debug] AMX backtrace:
[11:55:12] [debug] #0 native SendRconCommand () [00472150] from samp-server.exe
[11:55:12] [debug] #1 0001fd68 in public hostname () at D:\VMP\gamemodes\BF2SAMP.pwn:210
note : I Already read ****** about string 256 size already and all of my static string its just [50] its most
this is my static define
pawn Код:
static carid;
static adminname[50];
static wadmin[50];
static string3[50];
static string2[50];
static stringtext[50];
static aname[50];
static targetid;
static pname[50];
static msg[50];
static name[50];
static name2[50];
static Float:X, Float:Y, Float:Z, Float:angle;
and I have dini floatset at
pawn Код:
dini_FloatSet(file, "PosX", PlayerInfo[playerid][PosX]);
dini_FloatSet(file, "PosY", PlayerInfo[playerid][PosY]);
dini_FloatSet(file, "PosZ", PlayerInfo[playerid][PosZ]);
dini_FloatSet(file, "ArmyLevel", PlayerInfo[playerid][ArmyLevel]);
sorry with my bad grammar in English T_T