#1

I've tried to make a simple menu to give you guns, I've came across an error already.

Код:
C:\Users\ant\Desktop\SA-MP Server\gamemodes\lvdm.pwn(175) : warning 219: local variable "gunmenu" shadows a variable at a preceding level
C:\Users\ant\Desktop\SA-MP Server\gamemodes\lvdm.pwn(208) : error 035: argument type mismatch (argument 1)
C:\Users\ant\Desktop\SA-MP Server\gamemodes\lvdm.pwn(174) : warning 204: symbol is assigned a value that is never used: "moneyammount"
C:\Users\ant\Desktop\SA-MP Server\gamemodes\lvdm.pwn(173) : warning 204: symbol is assigned a value that is never used: "health"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Script:

Код:
ShowMenuForPlayer(gunmenu, playerid); // Where the error is from.

new gunmenu[MAX_PLAYER_NAME]; // Variable created.

new Menu:gunmenu; // Menu created.

public OnGameModeInit()
{
gunmenu = CreateMenu("Gun Menu", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(gunmenu, 0, "Deagle");
AddMenuItem(gunmenu, 1, "Dildo");
Also, what would I need to add so what when you click say deagle, it gives you an actual deagle...
Reply
#2

This would be to do with a dialog won't it, damn.
Reply
#3

You can't have multiple variables with the same name in the same scope. In this case Menu:gunmenu and gunmenu[MAX_PLAYERS] are conflicting. Rename one of them.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)