25.06.2013, 07:12
Hey man, there's a small problem, or maybe it's just me (as I am really new to scripting), I've posted this:
At public OnPlayerCommandText(playerid, cmdtext[])
and I am getting this error messages:
But besides it you've a small typo here;
Hope I helped, and if ya could guide me through those error messages it will be great!
pawn Код:
CMD:buyguns(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(15k)\nShotgun(2.5k)\nMP5(5k)\nSpas12(170k)\n(50k)\n(60k)\nSniper(150k)\nHalf vest(10k)\nFull vest(20k)","Buy","Cancel");
return 1;
}
and I am getting this error messages:
pawn Код:
C:\Users\user\Desktop\Hazard Gaming\HZG V1.0\gamemodes\Hazard.pwn(574) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\Hazard Gaming\HZG V1.0\gamemodes\Hazard.pwn(574) : error 017: undefined symbol "cmd_buyguns"
C:\Users\user\Desktop\Hazard Gaming\HZG V1.0\gamemodes\Hazard.pwn(574) : error 029: invalid expression, assumed zero
C:\Users\user\Desktop\Hazard Gaming\HZG V1.0\gamemodes\Hazard.pwn(574) : fatal error 107: too many error messages on one line
pawn Код:
if(GetPlayerMoney(playerid) <1500) return SendClientMessage(playerid, COLOR_GRAD, "You don't have enough money to buy this item! chea!");
SendClientMessage(playerid, COLOR_GRAD, "You bought a deagle for 15k!"); //Purchased for 15,000. (15k)
GivePlayerMoney(playerid, -1500); // Only 1,500. (1.5k)
GivePlayerWeapon(playerid,24, 9999999);