[Unsolved][Please Really Need Help]Pawno Library Crash Bug?
#1

I did this:
pawn Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
  if(CurrentMenu == Weapsmenu)
{
  switch(row)
  {
    case 0: //AK-47
    {
      GivePlayerWeapon(playerid, 30, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [AK-47] successfully spawned");
    }
    case 1: //HS Rocket Launcher
    {
      GivePlayerWeapon(playerid, 36, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [HS Rocket Launcher] successfully spawned");
    }
    case 2: //Bazooka
    {
      GivePlayerWeapon(playerid, 35, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [Bazooka] successfully spawned");
    }
    case 3: //Grenade
    {
      GivePlayerWeapon(playerid, 16, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [Grenade] successfully spawned");
    }
    case 4: //Sawn-Off Shotgun
    {
      GivePlayerWeapon(playerid, 26, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [Sawn-Off Shotgun] successfully spawned");
    }
    case 5: //Flamethrower
    {
      GivePlayerWeapon(playerid, 37, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [Flamethrower] successfully spawned");
    }
  }
}
And it gave me 26 shitty errors!!!!!!!

Please help me solve this!


I think this is also the same...


http://forum.sa-mp.com/index.php?topic=130347.0
Reply
#2

Yes, you forgot to add the bracket at the end (}).
Reply
#3

Ok, that is fixed, but now i have another problem...
pawn Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:CurrentMenu = GetPlayerMenu(playerid);//Line 1316
  if(CurrentMenu == Weapsmenu)
{
  switch(row)
  {
    case 0: //AK-47
    {
      GivePlayerWeapon(playerid, 30, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [AK-47] successfully spawned");
    }
    case 1: //HS Rocket Launcher
    {
      GivePlayerWeapon(playerid, 36, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [HS Rocket Launcher] successfully spawned");
    }
    case 2: //Bazooka
    {
      GivePlayerWeapon(playerid, 35, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [Bazooka] successfully spawned");
    }
    case 3: //Grenade
    {
      GivePlayerWeapon(playerid, 16, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [Grenade] successfully spawned");
    }
    case 4: //Sawn-Off Shotgun
    {
      GivePlayerWeapon(playerid, 26, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [Sawn-Off Shotgun] successfully spawned");
    }
    case 5: //Flamethrower
    {
      GivePlayerWeapon(playerid, 37, 3000);
      SendClientMessage(playerid, COLOR_ORANGE, "Server: Weapon [Flamethrower] successfully spawned");
    }
  }
}

and these errors...
Код:
C:\Documents and Settings\mani\Desktop\Server\gamemodes\FFA.pwn(1316) : error 003: declaration of a local variable must appear in a compound block
C:\Documents and Settings\mani\Desktop\Server\gamemodes\FFA.pwn(1317) : error 010: invalid function or declaration
C:\Documents and Settings\mani\Desktop\Server\gamemodes\FFA.pwn(1319) : error 010: invalid function or declaration
C:\Documents and Settings\mani\Desktop\Server\gamemodes\FFA.pwn(1321) : error 010: invalid function or declaration
C:\Documents and Settings\mani\Desktop\Server\gamemodes\FFA.pwn(1326) : error 010: invalid function or declaration
C:\Documents and Settings\mani\Desktop\Server\gamemodes\FFA.pwn(1331) : error 010: invalid function or declaration
C:\Documents and Settings\mani\Desktop\Server\gamemodes\FFA.pwn(1336) : error 010: invalid function or declaration
C:\Documents and Settings\mani\Desktop\Server\gamemodes\FFA.pwn(1341) : error 010: invalid function or declaration
C:\Documents and Settings\mani\Desktop\Server\gamemodes\FFA.pwn(1346) : error 010: invalid function or declaration
Reply
#4

<DELeTE>

Sorry, posted this in the wrong topic
Reply
#5

I have fixed the errors and everthing is fine!

But, now when i compile, the pawno library crashes! WTF!!??!!
Reply
#6

You deleted a bracket to much
Reply
#7

Its this line:
Код:
new CurrentMenu = GetPlayerMenu(playerid);
When i take it out, pawno is fine, but then it says:
Код:
Undefined symbol "CurrentMenu"
Reply
#8

https://sampwiki.blast.hk/wiki/GetPlayerMenu
Reply
#9

Quote:
Originally Posted by dice7
Fail
Reply
#10

BUMP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)