SA-MP Forums Archive
[Unsolved][Please Really Need Help]Pawno Library Crash Bug? - 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: [Unsolved][Please Really Need Help]Pawno Library Crash Bug? (/showthread.php?tid=105309)



[Unsolved][Please Really Need Help]Pawno Library Crash Bug? - Tigerbeast11 - 28.10.2009

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


Re: 26 Errors! Missing Bracket?? - Correlli - 28.10.2009

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


Re: 26 Errors! Missing Bracket?? - Tigerbeast11 - 28.10.2009

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



Re: [Solved]26 Errors! Missing Bracket?? - Tigerbeast11 - 28.10.2009

<DELeTE>

Sorry, posted this in the wrong topic


Re: [Unsolved][Please Really Need Help]9 New Errors!!!!! - Tigerbeast11 - 28.10.2009

I have fixed the errors and everthing is fine!

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


Re: [Unsolved][Please Really Need Help]Pawno Library Crash Bug? - dice7 - 28.10.2009

You deleted a bracket to much


Re: [Unsolved][Please Really Need Help]Pawno Library Crash Bug? - Tigerbeast11 - 28.10.2009

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



Re: [Unsolved][Please Really Need Help]Pawno Library Crash Bug? - dice7 - 28.10.2009

https://sampwiki.blast.hk/wiki/GetPlayerMenu


Re: [Unsolved][Please Really Need Help]Pawno Library Crash Bug? - Tigerbeast11 - 28.10.2009

Quote:
Originally Posted by dice7
Fail


Re: [Unsolved][Please Really Need Help]Pawno Library Crash Bug? - Tigerbeast11 - 28.10.2009

BUMP