SA-MP Forums Archive
Help with OnDialogResponse - 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 with OnDialogResponse (/showthread.php?tid=196800)



Help with OnDialogResponse - ZmaXy - 06.12.2010

Код:
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC3\gamemodes\Cyber.pwn(14507) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC3\gamemodes\Cyber.pwn(14509) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC3\gamemodes\Cyber.pwn(14511) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC3\gamemodes\Cyber.pwn(14523) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC3\gamemodes\Cyber.pwn(14535) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC3\gamemodes\Cyber.pwn(14540) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC3\gamemodes\Cyber.pwn(14545) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC3\gamemodes\Cyber.pwn(14551) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
Lines:

Код:
if(dialogid == 20)
	{
		if(response)
		{
   			if(listitem == 0)
			{
                    GivePlayerWeapon(playerid,4,1);
                    GivePlayerWeapon(playerid,22,90);
                    GivePlayerWeapon(playerid,25,50);
                    GivePlayerWeapon(playerid,29,120);
                    GivePlayerWeapon(playerid,34,15);
                    GivePlayerWeapon(playerid,31,260);
                    GivePlayerWeapon(playerid,46,1);
                    GivePlayerWeapon(playerid,39,10);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Uzeli ste opremu br. jedan!");
            }
		    if(listitem == 1)
			{
                    GivePlayerWeapon(playerid,24,90);
                    GivePlayerWeapon(playerid,27,120);
                    GivePlayerWeapon(playerid,28,190);
                    GivePlayerWeapon(playerid,30,260);
                    GivePlayerWeapon(playerid,33,150);
                    GivePlayerWeapon(playerid,41,1000);
                    GivePlayerWeapon(playerid,44,1);
                    GivePlayerWeapon(playerid,43,50);
				    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Uzeli ste opremu br. dva!");
		    }
		    if(listitem == 2)
			{
                    SetPlayerHealth(playerid, 120);
				    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pojeo si nekoliko cufti..Sad si sit!");
		    }
		    if(listitem == 3)
			{
                    SetPlayerArmour(playerid, 100);
				    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Uzeli ste i obukli Pancir!");
		    }
		    if(listitem == 4)
			{
                    GivePlayerWeapon(playerid,17,17);
				    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabrali ste odelo iz ormara i obukli ga!");
		    }
		}
		return 1;
	}
   }
}
Please help me !!!


Re: Help with OnDialogResponse - TheXIII - 06.12.2010

Looks like you added it outside of a callback. Or some bracket is wrong/excessive, which is really the same thing.


Re: Help with OnDialogResponse - XePloiT - 07.12.2010

show what the exact lines are...


Re: Help with OnDialogResponse - fangoth1 - 07.12.2010

you have done this wrong i belive, try this
pawn Код:
if(dialogid == 20)
          {
           switch(listitem)
              {
          case 0:

          {
                    GivePlayerWeapon(playerid,4,1);
                    GivePlayerWeapon(playerid,22,90);
                    GivePlayerWeapon(playerid,25,50);
                    GivePlayerWeapon(playerid,29,120);
                    GivePlayerWeapon(playerid,34,15);
                    GivePlayerWeapon(playerid,31,260);
                    GivePlayerWeapon(playerid,46,1);
                    GivePlayerWeapon(playerid,39,10);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Uzeli ste opremu br. jedan!");
                    }
         
                    case 1:
           
                    {
                    GivePlayerWeapon(playerid,24,90);
                    GivePlayerWeapon(playerid,27,120);
                    GivePlayerWeapon(playerid,28,190);
                    GivePlayerWeapon(playerid,30,260);
                    GivePlayerWeapon(playerid,33,150);
                    GivePlayerWeapon(playerid,41,1000);
                    GivePlayerWeapon(playerid,44,1);
                    GivePlayerWeapon(playerid,43,50);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, "Uzeli ste opremu br. dva!");
                    }

                    case 2:
           
           {
                    SetPlayerHealth(playerid, 120);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, "Pojeo si nekoliko cufti..Sad si sit!");
                    }
           

                    case 3:              
           
                    {
                    SetPlayerArmour(playerid, 100);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, "Uzeli ste i obukli Pancir!");
                    }
          case 4:

           {
                    GivePlayerWeapon(playerid,17,17);
           SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabrali ste odelo iz ormara i obukli ga!");
                    }
           }
           return 1;
    }
   }
}