What's wrong with this?
#1

This is a functio i've been working on. what's wrong with it? whenever I incude it in my gamemode or fs the compiler crashes if i try to compile.

pawn Код:
new inc_Gangzone[][][8];
new split_gangzones = 0;

forward CreateSplitGangzone(minx, miny, maxx, maxy, rows, columns);

public CreateSplitGangzone(minx, miny, maxx, maxy, rows, columns)
 {
  if((rows != 0 && columns != 0) && (split_gangzones) < 8))
  {
    new s_x = maxx-minx;
    new s_y = maxy-miny;
    new max_x, max_y, min_x, min_y;
    for(new i = 1; i <= columns; i++)
        {
            min_x = minx + ((s_x/columns)*(i-1));
            max_x = maxx - ((s_x/columns)*(i));
            for(new j = 1; j <= rows; j++)
            {
                min_y = miny +((s_y/columns)*(j-1));
                max_y = maxy +((s_y/columns)*(j));
                inc_Gangzone[i][j][split_gangzones] = GangZoneCreate(min_x, min_y, max_x, max_y);
            }
        }
        split_Gangzones++;
  }
  return 0;
 }
Reply


Messages In This Thread
What's wrong with this? - by Ignas1337 - 23.05.2009, 08:09
Re: What's wrong with this? - by Ignas1337 - 23.05.2009, 08:15
Re: What's wrong with this? - by yezizhu - 23.05.2009, 08:17
Re: What's wrong with this? - by Ignas1337 - 23.05.2009, 08:23
Re: What's wrong with this? - by yezizhu - 23.05.2009, 08:34
Re: What's wrong with this? - by Ignas1337 - 23.05.2009, 10:11
Re: What's wrong with this? - by yezizhu - 23.05.2009, 12:09
Re: What's wrong with this? - by Ignas1337 - 23.05.2009, 16:37
Re: What's wrong with this? - by yezizhu - 23.05.2009, 17:41
Re: What's wrong with this? - by Ignas1337 - 24.05.2009, 03:35

Forum Jump:


Users browsing this thread: 1 Guest(s)