[HELP] /buyweapon command
#1

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
Reply
#2

What's in line 14?!
Reply
#3

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?
Reply
#4

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

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
Reply
#6

Use [code] [/ code]
Reply
#7

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


Forum Jump:


Users browsing this thread: 2 Guest(s)