SA-MP Forums Archive
Mode => Unknown - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Mode => Unknown (/showthread.php?tid=155269)



Mode => Unknown - wofka13 - 17.06.2010

(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



Re: Mode => Unknown - Luka P. - 17.06.2010

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



Re: Mode => Unknown - MadeMan - 17.06.2010

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

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