Variable changed and I don't know how or where
#1

Hi. Sorry for my bad english.

I have array, forex. this:

Код:
enum PIC_DATA
{
	Float:Picx,
	Float:Picy,
	Float:Picz,
	Picvw
}
new PickupEx[2000][PIC_DATA];
... and this array never changed in my script (only in OnGameModeInit), but after a few minutes (10-30) PickupEx[55][Picz] change from 1001.1532 to ./,),(-*,(.(((((( (if I print this variable in chat by %f) and this happens in PickupEx with id 25,55,85,115,145,175,205,235 (difference is always 30) on Picz.
How is that even possible or how to fix or what can it do?

Print of all my values in PickupEx, look at red lines:

Код:
[20:40:39] POS: 1171.556762, 1354.098632, 10.921899
[20:40:39] POS: 415.122711, 2533.439941, 19.148399
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: -1423.581298, -287.859588, 14.148400
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 1677.396606, 1447.790771, 10.775799
[20:40:39] POS: 1686.193603, -2241.943115, 13.546899
[20:40:39] POS: 399.135803, 2532.550781, 16.544599
[20:40:39] POS: 2445.426025, 2377.410156, 12.163499
[20:40:39] POS: 246.326995, 109.583999, 1003.218017
[20:40:39] POS: 234.171905, 158.449905, 1003.023376
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: -2163.526611, 643.890319, 1057.593750
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 1773.800415, 2075.153320, 10.820300
[20:40:39] POS: 1880.840576, 2339.575195, 10.979900
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 1840.285278, 2094.805664, 10.820300
[20:40:39] POS: -2172.706298, 679.887207, 55.161998
[20:40:39] POS: -2158.949707, 642.516418, 1052.375000
[20:40:39] POS: 1171.660034, 1358.062011, 10.921899
[20:40:39] POS: -2029.212890, -101.311302, 35.164100
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 251.669601, 117.295501, 1003.218811
[20:40:39] POS: 0.000000, 0.000000, ./,),(-*,(.((((((
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 1051.373046, 1939.308227, 10.812999
[20:40:39] POS: 1623.253540, 1817.668090, 10.820300
[20:40:39] POS: 350.701110, 2020.325439, 22.640600
[20:40:39] POS: 2370.773437, 2727.693115, 10.820300
[20:40:39] POS: 2171.724853, 1404.369506, 11.062500
[20:40:39] POS: 2079.343750, 2222.396972, 10.820300
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 2023.703613, 996.242675, 10.820300
[20:40:39] POS: 2193.866699, 1987.457031, 12.296899
[20:40:39] POS: 249.399002, 69.196601, 1003.640625
[20:40:39] POS: 1178.026245, -1327.724975, 14.099699
[20:40:39] POS: -1618.868041, 677.643981, 7.187500
[20:40:39] POS: -2024.512329, 64.104598, 28.441999
[20:40:39] POS: -2656.176025, 634.976928, 14.453100
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 1498.429809, -1582.629028, 13.546899
[20:40:39] POS: 1304.502075, -1369.353027, 13.560099
[20:40:39] POS: -1969.637207, 458.496398, 35.171901
[20:40:39] POS: -1497.448486, 925.933593, 7.187500
[20:40:39] POS: 2512.833251, -1666.255249, 13.571299
[20:40:39] POS: 2141.110839, -1153.859252, 23.992200
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 2287.012207, 2431.985839, 10.820300
[20:40:39] POS: 238.626403, 138.944503, 1003.023376
[20:40:39] POS: 2337.139648, 2458.975341, 14.974200
[20:40:39] POS: 288.779602, 167.358703, 1007.171875
[20:40:39] POS: 2159.158691, 943.122985, 10.820300
[20:40:39] POS: 285.790588, -86.474700, ./,),(-*,(.((((((
[20:40:39] POS: 1554.965698, -1675.611083, 16.195299
[20:40:39] POS: 246.812805, 62.681800, 1003.640625
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 2412.952148, 1123.810546, 10.820300
[20:40:39] POS: 390.179199, 173.793502, 1008.382812
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 2019.855102, 1007.711425, 10.820300
[20:40:39] POS: 2018.773925, 1017.834594, 996.875000
[20:40:39] POS: -2242.130371, 128.634094, 35.320301
[20:40:39] POS: -2240.552734, 128.393798, 1035.414062
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 2539.398193, 2083.997314, 10.820300
[20:40:39] POS: -2231.451904, 130.066299, 1035.414062
[20:40:39] POS: 1106.509887, 1601.436767, 12.546899
[20:40:39] POS: 1259.228027, -785.340881, 92.030197
[20:40:39] POS: 1298.487182, -798.225830, 84.140602
[20:40:39] POS: 1298.925781, -796.833984, 1084.007812
[20:40:39] POS: 1260.797363, -785.465026, 1091.906250
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 1969.076171, -2179.724609, 13.546899
[20:40:39] POS: 296.884307, -111.917396, 1001.515625
[20:40:39] POS: 777.002380, 1871.412841, 4.906700
[20:40:39] POS: 2333.686035, 61.647098, 26.705799
[20:40:39] POS: 1368.616943, -1279.792724, 13.546899
[20:40:39] POS: 2400.489257, -1981.649902, 13.546899
[20:40:39] POS: 243.068496, -178.337493, 1.582200
[20:40:39] POS: -2093.491943, -2464.645019, 30.625000
[20:40:39] POS: -2625.847167, 208.235198, ./,),(-*,(.((((((
[20:40:39] POS: -1508.896972, 2610.568847, 55.835899
[20:40:39] POS: -2650.908691, 1362.665039, 20.726600
[20:40:39] POS: 2513.324218, -1679.526855, 13.478699
[20:40:39] POS: 1629.987915, -1886.598388, 13.553999
[20:40:39] POS: 748.852416, -1434.769775, 13.523400
[20:40:39] POS: 2483.145751, -1940.921264, 13.546899
[20:40:39] POS: 2446.150390, 2333.181640, 82.773399
[20:40:39] POS: 2507.361328, 1242.658203, 10.820300
[20:40:39] POS: 1836.445434, -1682.419433, 13.347599
[20:40:39] POS: -2551.176269, 193.790405, 6.230899
[20:40:39] POS: 493.417205, -23.569999, 1000.679687
[20:40:39] POS: 2497.345703, 1282.098022, 10.812500
[20:40:39] POS: 2196.627929, 1677.168579, 12.367199
[20:40:39] POS: 2233.939453, 1714.295043, 1012.382812
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 2494.408203, 2765.409912, 10.820300
[20:40:39] POS: 2453.819335, 2348.857666, 12.163499
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 364.920806, -11.466300, 1001.851623
[20:40:39] POS: 2397.849853, -1898.772094, 13.546899
[20:40:39] POS: 2419.999511, -1508.987792, 24.000000
[20:40:39] POS: 928.487426, -1352.957885, 13.343799
[20:40:39] POS: 2638.385986, 1671.926879, 11.023400
[20:40:39] POS: 2838.276367, 2407.578125, 11.069000
[20:40:39] POS: 2102.147705, 2228.863525, 11.023400
[20:40:39] POS: 2393.119384, 2041.755981, 10.820300
[20:40:39] POS: -1816.581054, 618.318420, 35.171901
[20:40:39] POS: -2671.673339, 258.151000, 4.632800
[20:40:39] POS: -2155.122802, -2460.229736, 30.851600
[20:40:39] POS: 372.361511, -133.524200, ./,),(-*,(.((((((
[20:40:39] POS: -1808.661865, 945.825988, 24.890600
[20:40:39] POS: 203.414398, -202.128799, 1.578099
[20:40:39] POS: 2332.048828, 75.036300, 26.621000
[20:40:39] POS: 2351.832763, 2533.477294, 10.820300
[20:40:39] POS: 2756.585937, 2477.119628, 11.062500
[20:40:39] POS: 2083.343750, 2224.550781, 11.023400
[20:40:39] POS: 2638.723876, 1849.829223, 11.023400
[20:40:39] POS: -1721.404296, 1359.749633, 7.185299
[20:40:39] POS: -2624.598388, 1412.384155, 7.093800
[20:40:39] POS: -2636.738281, 1402.542602, 906.460876
[20:40:39] POS: 363.055999, -74.964797, 1001.507812
[20:40:39] POS: 2366.797607, 2071.076660, 10.820300
[20:40:39] POS: 2472.667480, 2034.153320, 11.062500
[20:40:39] POS: 1872.410156, 2071.852050, 11.062500
[20:40:39] POS: 2169.756591, 2795.841064, 10.820300
[20:40:39] POS: 1158.000488, 2072.215820, 11.062500
[20:40:39] POS: 1199.301391, -918.327514, 43.121498
[20:40:39] POS: 810.741699, -1616.208007, 13.546899
[20:40:39] POS: -2356.101074, 1008.096496, 50.898399
[20:40:39] POS: -1912.199462, 828.101013, 35.213500
[20:40:39] POS: -2336.840820, -166.831604, 35.554698
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: 2325.111328, -1518.287841, 25.343700
[20:40:39] POS: 0.000000, 0.000000, ./,),(-*,(.((((((
[20:40:39] POS: 0.000000, 0.000000, 0.000000
[20:40:39] POS: -1213.634399, 1830.528320, 41.929698
[20:40:39] POS: 1367.327026, 248.388305, 19.566900
[20:40:39] POS: 2105.164306, -1806.515258, 13.554699
[20:40:39] POS: 2229.640136, -1721.532836, 13.563799
[20:40:39] POS: -2270.188476, -155.922195, 35.320301
[20:40:39] POS: 1968.811645, 2295.610107, 16.455900
[20:40:39] POS: 772.292175, -5.131400, 1000.728576
[20:40:39] POS: 774.094787, -50.282199, 1000.585876
[20:40:39] POS: 773.865112, -78.532600, 1000.662414
[20:40:39] POS: 1570.813354, -1337.109497, 16.484399
[20:40:39] POS: 1548.617187, -1364.184814, 326.218292
[20:40:39] POS: 984.245788, -1269.983642, 15.081899
[20:40:39] POS: 994.443420, -1525.535156, 13.559900
[20:40:39] POS: 2695.544433, -1704.655395, 11.843799
[20:40:39] POS: 1090.838012, 1601.673706, 12.546899
[20:40:39] POS: -2121.453613, -443.689788, 35.534400
[20:40:39] POS: -2409.635986, -2189.936523, 34.039100
[20:40:39] POS: 161.417404, -96.724098, 1001.804687
[20:40:39] POS: 207.662399, -110.911003, 1005.132812
[20:40:39] POS: 227.130401, -8.163900, 1002.210876
[20:40:39] POS: 204.326797, -168.543899, 1000.523376
[20:40:39] POS: 207.049697, -140.105102, 1003.507812
[20:40:39] POS: 203.787902, -50.433898, 1001.804687
[20:40:39] POS: 167.444305, -92.345703, 1001.804687
[20:40:39] POS: 167.895904, -77.057098, 1001.804687
[20:40:39] POS: 202.887603, -107.893203, 1005.132812
[20:40:39] POS: 203.324401, -101.555702, 1005.257812
[20:40:39] POS: 214.253204, -5.103700, 1001.210876
[20:40:39] POS: 209.856796, -7.762199, ./,),(-*,(.((((((
[20:40:39] POS: 200.068496, -161.911193, 1000.523376
[20:40:39] POS: 209.059600, -165.209503, 1000.530578
[20:40:39] POS: 198.382904, -135.901901, 1003.507812
[20:40:39] POS: 200.150299, -138.717498, 1003.507812
[20:40:39] POS: 198.262802, -47.841598, 1001.804687
[20:40:39] POS: 198.006393, -40.219898, 1001.804687
[20:40:39] POS: 2244.426757, -1665.210205, 15.476499
[20:40:39] POS: 2112.832519, -1211.728027, 23.963199
[20:40:39] POS: 1456.663818, -1137.819946, 23.958599
[20:40:39] POS: 499.633789, -1360.412353, 16.349599
[20:40:39] POS: 461.427490, -1500.819458, 31.059900
[20:40:39] POS: 454.021087, -1478.056030, 30.814300
[20:40:39] POS: -2490.412841, -29.072599, 25.617099
[20:40:39] POS: -2373.953369, 910.110229, 45.441001
[20:40:39] POS: -1882.453735, 866.315429, 35.171798
[20:40:39] POS: -1694.779541, 951.680908, 24.890600
[20:40:39] POS: 1656.867431, 1733.336059, 10.828100
[20:40:39] POS: 2090.487548, 2224.435546, 11.023400
[20:40:39] POS: 2102.009033, 2257.409667, 11.023400
[20:40:39] POS: 2779.595214, 2453.788085, 11.062500
[20:40:39] POS: 2802.776611, 2430.542724, 11.062500
[20:40:39] POS: 2826.050292, 2407.400146, 11.062500
[20:40:39] POS: 291.029785, -85.198997, 1001.515625
[20:40:39] POS: 296.874389, -104.365097, 1001.515625
[20:40:39] POS: 665.202087, -579.444580, 16.335899
[20:40:39] POS: 241.367599, -56.624000, 1.578099
[20:40:39] POS: 2335.541259, 50.542598, 26.482500
[20:40:39] POS: -302.796112, 1039.851928, 19.717300
[20:40:39] POS: -855.461914, 1528.611938, 22.586999
[20:40:39] POS: -251.469802, 2595.530273, ./,),(-*,(.((((((
[20:40:39] POS: -1522.184326, 2519.783691, 55.903900
[20:40:39] POS: -2239.914550, 2355.874267, 4.979300
[20:40:39] POS: 1761.090698, -1940.983032, 13.582799
[20:40:39] POS: -2143.286621, -2457.230957, 30.625000
[20:40:39] POS: 2316.490722, -1010.675781, 1054.718750
[20:40:39] POS: 2364.066650, -1127.369140, 1050.875000
[20:40:39] POS: 2807.277587, -1165.435791, 1025.570312
[20:40:39] POS: 220.208206, 1289.750610, 1082.140625
[20:40:39] POS: 170.200698, -1951.700927, 3.773400
[20:40:39] POS: 217.365402, -100.947303, 1005.257812
[20:40:39] POS: 213.791702, -42.620899, 1002.023376
[20:40:39] POS: 216.580398, -157.222000, 1000.523376
[20:40:39] POS: 182.280197, -89.213500, 1002.023376
[20:40:39] POS: 198.993301, -131.058197, 1003.515197
[20:40:39] POS: 210.960693, -4.673299, 1001.210876
[20:40:39] POS: 301.790893, -77.012199, 1001.515625
[20:40:39] POS: 301.716491, -75.321601, 1001.515625
[20:40:39] POS: -1956.184204, 283.857513, 35.468799
[20:40:39] POS: 2131.756347, -1150.088989, 24.194999
[20:40:39] POS: 535.571777, 2363.979003, 30.558399
[20:40:39] POS: 1997.986816, 956.290710, 10.812600
[20:40:39] POS: 2082.469726, 1387.276855, 10.820300
[20:40:39] POS: 2333.268554, 1928.834106, 10.820300
[20:40:39] POS: 1992.581787, 2634.885009, 10.820300
[20:40:39] POS: 1724.663818, 1320.780273, 10.773400
[20:40:39] POS: 1143.141235, -935.179992, 43.058498
[20:40:39] POS: 410.567413, -1327.798339, 14.877200
[20:40:39] POS: 849.109008, -1833.306396, 12.351799
[20:40:39] POS: 1952.235595, -2152.374511, 13.546899
[20:40:39] POS: 1515.419555, -1612.943847, ./,),(-*,(.((((((
[20:40:39] POS: -2604.587890, 1370.468627, 7.187900
[20:40:39] POS: -1550.290649, 884.175476, 7.265600
[20:40:39] POS: -1751.098632, 941.165771, 24.890600
[20:40:39] POS: -1991.877929, 486.561096, 35.164100
[20:40:39] POS: -2056.513427, -80.033996, 35.320301
[20:40:39] POS: 1815.807861, -1298.915527, 22.210899
[20:40:39] POS: 1316.580322, 1251.215820, 10.820300
[20:40:39] POS: -1225.259765, 48.478000, 14.135100
[20:40:39] POS: 1954.055908, -2178.102539, 13.546899
[20:40:39] POS: 224.676300, 1037.153076, 1084.013549
Help me pleeease,
Thank you in advance..
Reply
#2

Updated, it is problem with id 25,55,85,115,145,175,205,235 (difference is always 30)...
I need help, pleeeease ...
Does anyone know?
Reply
#3

Well, what I would do is initialize them before hand. Or add another variable to the enum, for example: pIdExist, and initialize that to 0 for the ones that you don't want to exists and so forth.. And when the pickups are placed, this, pIdExist, would change value to 1. Now to debug the problem, I would suggest using "printf" anywhere you find PickupEx, see what happens before going ingame, and after going ingame. Look at the values and see where and how they may change. EX of the printf function, well I am assuming you use a loop to create each pickup, so:
Код:
for(new id=0; id<2000; id++)
{
    printf("PickID: %d | X: %0.2f | Y: %0.2f | Z: %0.2f",id,PickupEx[id][Picx],PickupEx[id][Picy],PickupEx[id][Picz]);
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)