SA-MP Forums Archive
[HELP] /buyweapon command - 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: [HELP] /buyweapon command (/showthread.php?tid=487165)



[HELP] /buyweapon command - Cjay123 - 12.01.2014

i can't compile my new script because of this

CMD:buyweapon(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 40, 286.148986,-40.644397,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 286.800994,-82.547599,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 296.919982,-108.071998,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 314.820983,-141.431991,999.601562) || IsPlayerInRangeOfPoint(playerid, 40, 316.524993,-167.706985,999.593750))
ShowPlayerDialog(playerid, DIALOGWEAPONS, DIALOG_STYLE_LIST, "Hello, what guns can I get you?", "Deagle-2500\nShotgun-500\nMP5-700\nAK-47(5000)","Buy","Cancel");
return 1;
}





[ERRORS]

C:\Documents and Settings\PC1\Desktop\[American Roleplay][v.1.0]\pawno\gunshop.pwn(14) : error 029: invalid expression, assumed zero
C:\Documents and Settings\PC1\Desktop\[American Roleplay][v.1.0]\pawno\gunshop.pwn(14) : error 017: undefined symbol "cmd_buyweapon"
C:\Documents and Settings\PC1\Desktop\[American Roleplay][v.1.0]\pawno\gunshop.pwn(14) : error 029: invalid expression, assumed zero
C:\Documents and Settings\PC1\Desktop\[American Roleplay][v.1.0]\pawno\gunshop.pwn(14) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.



+REP for help


Re: [HELP] /buyweapon command - amirab - 12.01.2014

What's in line 14?!


Re: [HELP] /buyweapon command - nmader - 12.01.2014

Do you have <zcmd> at the top of your script? I can tell your issue is that, because the syntax is fine. Where did you place it (your command) in your script?


Re: [HELP] /buyweapon command - Sojo12 - 12.01.2014

You have misplaced the code and you have to define the include zcmd before scripting a CMD.


Re: [HELP] /buyweapon command - Cjay123 - 13.01.2014

Quote:
Originally Posted by amirab
Посмотреть сообщение
What's in line 14?!
line 14 is (CMD:buyweapon(playerid, params[])

and i put the #include <zcmd> at the top


Re: [HELP] /buyweapon command - Beckett - 13.01.2014

Use [code] [/ code]


Re: [HELP] /buyweapon command - SilentSoul - 13.01.2014

Compiled fine for me. update your zcmd include and try to re-compile https://sampforum.blast.hk/showthread.php?tid=91354