Mode => Unknown
#1

(Sry for bad English )
My problem is the following,
under OnGameModeInit
I have a load line ...
Код:
public OnGameModeInit()
{
  .....
  Laden();
  .....
    return 1;
}
Код:
stock Laden()
{
  //Pickups & GameTexte
  for(new i=0;i<MAX_HOUSES;i++)
  {
    new string5[256];
    if(OpenINI("Haus.cfg"))
    {
      new house;
      for(house = 0; house <= MAX_HOUSES; house++)
      {
        format(string5, 64, "eX%d", house);
        HausInfo[house][eX] = ReadFloatKey(string5);
        format(string5, 64, "eY%d", house);
        HausInfo[house][eY] = ReadFloatKey(string5);
        format(string5, 64, "eZ%d", house);
        HausInfo[house][eZ] = ReadFloatKey(string5);
        AddStaticPickup(1273, 2, HausInfo[house][eX],HausInfo[house][eY],HausInfo[house][eZ]);
      }
    }
    CloseINI();
  }
  return 1;
}
If i put @ OnGameModeInit
Код:
Laden();
is Mode Name = Unknown.
In the stock I see no errors it causes.
PS, do not be surprised because of silly string and the name, number
I change course, if everything works.
I hope anywhere can help me
Thank You
Reply
#2

pawn Код:
public OnGameModeInit()
{
  SetGameModeText("this is my gamemode");
  .....
  Laden();
  .....
  return 1;
}
Reply
#3

pawn Код:
for(house = 0; house <= MAX_HOUSES; house++)
change <= to <

pawn Код:
for(house = 0; house < MAX_HOUSES; house++)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)