SA-MP Forums Archive
[HELP] Error Into My Menu - 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: [HELP] Error Into My Menu (/showthread.php?tid=96303)



[HELP] Error Into My Menu - Smiths - 07.09.2009

I can't find the error! look

Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
  if(CurrentMenu == Test)
  {
    switch(row)
    {
      case 0:
      {
        //Your Code Here
      }
      case 1:
      {
        //Your Code Here
      }
      case 2:
      {
        //Your Code Here
      }
      case 3:
      {
        //Your Code Here
      }
      case 4:
      {
        //Your Code Here
      }
    }
  }
}
I got a WARNING into if(CurrentMenu == Test)

warning 217: loose indentation


Re: [HELP] Error Into My Menu - ilikepie2221 - 07.09.2009

You loosely indented it. For example, this would be loose:

pawn Код:
public SomeCallback()
{
  //Function
    // Another function that is loosely indented
}
See? Make sure that you use either tab or four spaces always.


Re: [HELP] Error Into My Menu - LuxurioN™ - 07.09.2009

pawn Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == Test)
      {
      switch(row)
      {
      case 0:
      {
        //Your Code Here
      }
      case 1:
      {
        //Your Code Here
      }
      case 2:
      {
        //Your Code Here
      }
      case 3:
      {
        //Your Code Here
      }
      case 4:
      {
        //Your Code Here
      }
    }
  }
}