Warning
#1

Код:
warning 215: expression has no effect
Код:
else if ((id = Garbage_Nearest(playerid)) != -1)
				{
				    if (GarbageData[id][garbageCapacity] >= 20)
				        return SendErrorMessage(playerid, "This garbage bin is full of trash.");

                    GarbageData[id][garbageCapacity]+19;
                    Garbage_Save(id);

					Inventory_Remove(playerid, string);
                    SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s throws a \"%s\" into the garbage bin. **", ReturnName(playerid, 0), string);

                    format(string, sizeof(string), "[Garbage %d]\n{FFFFFF}Trash Capacity: %d/20", id, GarbageData[id][garbageCapacity]);
                    UpdateDynamic3DTextLabelText(GarbageData[id][garbageText3D], COLOR_DARKBLUE, string);
				}
				else if (InventoryData[playerid][itemid][invQuantity] == 1)
					DropPlayerItem(playerid, itemid);

				else
					Dialog_Show(playerid, DropItem, DIALOG_STYLE_INPUT, "Drop Item", "Item: %s - Quantity: %d\n\nPlease specify how much of this item you wish to drop:", "Drop", "Cancel", string, InventoryData[playerid][itemid][invQuantity]);
	        }

What am i doing wrong here I want to make it so when a player does this it refills it up 100%
Reply
#2

can you post the warning line ._.?
Reply
#3

GarbageData[id][garbageCapacity]+19;
Reply
#4

any ideas?
Reply
#5

Are you trying to do: GarbageData[id][garbageCapacity] += 19

??
Reply
#6

either use
pawn Код:
GarbageData[id][garbageCapacity] +=19;
or
pawn Код:
GarbageData[id][garbageCapacity] ++19;
Reply
#7

try this :

Quote:

else if ((id = Garbage_Nearest(playerid)) != -1)
{
if (GarbageData[id][garbageCapacity] >= 20)
return SendErrorMessage(playerid, "This garbage bin is full of trash.");

GarbageData[id][garbageCapacity]++19;
Garbage_Save(id);

Inventory_Remove(playerid, string);
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s throws a \"%s\" into the garbage bin. **", ReturnName(playerid, 0), string);

format(string, sizeof(string), "[Garbage %d]\n{FFFFFF}Trash Capacity: %d/20", id, GarbageData[id][garbageCapacity]);
UpdateDynamic3DTextLabelText(GarbageData[id][garbageText3D], COLOR_DARKBLUE, string);
}
else if (InventoryData[playerid][itemid][invQuantity] == 1)
DropPlayerItem(playerid, itemid);

else
Dialog_Show(playerid, DropItem, DIALOG_STYLE_INPUT, "Drop Item", "Item: %s - Quantity: %d\n\nPlease specify how much of this item you wish to drop:", "Drop", "Cancel", string, InventoryData[playerid][itemid][invQuantity]);
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)