Help? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Help? (
/showthread.php?tid=224440)
Help? -
07wilsonaf - 11.02.2011
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...
Re: Help? -
07wilsonaf - 11.02.2011
This would be to do with a dialog won't it, damn.
Re: Help? -
Vince - 12.02.2011
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.