SA-MP Forums Archive
Problem in OnGameModeInit() - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem in OnGameModeInit() (/showthread.php?tid=415257)



Problem in OnGameModeInit() - kamilot73 - 12.02.2013

Hello all. I have some problem. When I use in my OnGameModeInit():

Код:
new Float:bankomat[14][6] = {
{-2035.70605469,-102.35491180,35.07402039,0.00000000,0.00000000,270.00000000},
{-2033.32604980,159.50723267,28.94120598,0.00000000,0.00000000,178.00000000},
{-1676.34570312,434.01806641,7.08183193,0.00000000,0.00000000,226.00000000 },
{-2421.45410156,958.35540771,45.18632126,0.00000000,0.00000000,88.00000000},
{-2621.31445312,1415.23510742,6.88521862,0.00000000,0.00000000,158.00000000},
{-2452.32275391,2252.62988281,4.87058449,0.00000000,0.00000000,92.00000000},
{ -1282.38098145,2715.18652344,50.16842651,0.00000000,0.00000000,28.00000000},
{91.92106628,1180.56555176,18.56620598,0.00000000,0.00000000,90.00000000},
{-818.55200195,1567.63708496,27.01933098,0.00000000,0.00000000,178.00000000},
{2174.20336914,1402.93469238,10.96464443,0.00000000,0.00000000,0.00000000},
{1587.30920410,2218.34838867,10.96464443,0.00000000,0.00000000,88.00000000},
{2187.36035156,2478.89160156,11.14433193,0.00000000,0.00000000,180.00000000},
{2843.30444336,1286.17187500,11.29276943,0.00000000,0.00000000,270.00000000},
{1142.2105,-1764.4663,13.4303,0.00000000,0.00000000,180.00000000}
};
And in public OnGameModeInit():

Код:
for(new i;i<14;i++)
   {
   CreateDynamicObject(2754,bankomat[i][0],bankomat[i][1],bankomat[i][2],bankomat[i][3],bankomat[i][4],bankomat[i][5],-1,-1,-1,100);
   bank[i] = CreateDynamic3DTextLabel("PRINT:\"/ATM\"",COLOR_LIGHTBLUE, bankomat[i][0],bankomat[i][1],bankomat[i][2] + 1,7.0);
   }
but gamemode don't load after this ^

But when cycle = 10, all OK. Why?

P.S. Sorry for my bad English.


AW: Problem in OnGameModeInit() - roym899 - 12.02.2013

Please post your declaration of bank. (like new bank[12])
I suspect bank`s array size is smaller then 14


Re: AW: Problem in OnGameModeInit() - kamilot73 - 12.02.2013

Quote:
Originally Posted by roym899
Посмотреть сообщение
Please post your declaration of bank. (like new bank[12])
I suspect bank`s array size is smaller then 14
oh, FAIL. Thx you. FIX!