Pawno keeps on crashing
#7

To get rid of warning 217, you must indentate your code, like this:
Код:
public OnFilterScriptInit()
{
  code();
}
not like
Код:
public OnFilterScriptInit()
{
code();
}
Indentation means when there is an opening bracket, next line must move on by 4 spaces (in PAWNcc default is 8, yet it is defined to 4 in a_samp.inc). You can generate that by pressing TAB.

You get the errors at line 121 because you don't close OnPlayerSelectedMenuRow properly, you do this:
Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == shop)
{
  switch(row)
  {
    // cases here
    }
    return 1;
}
Indentation plays a big role, so you could see what is wrong.
You miss a } (closing bracket).
Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:CurrentMenu = GetPlayerMenu(playerid);
  if(CurrentMenu == shop)
  {
    switch(row)
    {
      // cases here
    }
    return 1;
  }
That is how the compiler reads it, which puts OnPlayerCommandText into previous callback...
Reply


Messages In This Thread
Pawno keeps on crashing - by Bas_NL - 13.06.2009, 10:05
Re: Pawno keeps on crashing - by JoeDaDude - 13.06.2009, 10:07
Re: Pawno keeps on crashing - by Donny_k - 13.06.2009, 10:20
Re: Pawno keeps on crashing - by Bas_NL - 13.06.2009, 10:27
Re: Pawno keeps on crashing - by Donny_k - 13.06.2009, 10:32
Re: Pawno keeps on crashing - by Bas_NL - 13.06.2009, 10:44
Re: Pawno keeps on crashing - by ZaZa - 13.06.2009, 10:51
Re: Pawno keeps on crashing - by Bas_NL - 13.06.2009, 11:19
Re: Pawno keeps on crashing - by Bas_NL - 13.06.2009, 15:14

Forum Jump:


Users browsing this thread: 1 Guest(s)