SA-MP Forums Archive
PInventory - 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)
+--- Thread: PInventory (/showthread.php?tid=330262)



PInventory - muhib777 - 31.03.2012

Код:
new Logs;
(64) : warning 204: symbol is assigned a value that is never used: "Logs"
Код:
public OnGameModeInit()
{

    new Logs = Create_Item("Logs");
}
(850) : error 017: undefined symbol "Logs"
(851) : error 017: undefined symbol "Logs"
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
        if (GetPlayerWeapon(playerid) == 9)
        {
		new rand = random(2);
		{
   			switch(rand)
			{
			case 0:  Add_Item(playerid, Logs);
			case 1:  Add_Item(playerid, Logs);
                        }
                 }
         }
         return 0;
}
I'm using this plugin https://sampforum.blast.hk/showthread.php?tid=280696 what am I doing wrong here?


Re : PInventory - muhib777 - 04.04.2012

bump


Re: PInventory - TzAkS. - 04.04.2012

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
        if (GetPlayerWeapon(playerid) == 9)
        {
                new Logs = Create_Item("Logs");
		new rand = random(2);
		{
   			switch(rand)
			{
			case 0:  Add_Item(playerid, Logs);
			case 1:  Add_Item(playerid, Logs);
                        }
                 }
         }
         return 0;
}
And delete this
Код:
new Logs = Create_Item("Logs");
from
public OnGameModeInit()