Need Help with Command for buying packages
#1

Hello, I need a bit of help with my script I'm developing. Using ZCMD, and Sscanf (both includes are working, and such). The command is suppose to be something like /buypackage weapondrop and /buypackage airstrike and so on.
I've been unable to resolve this issue however; Thanks in advance for assistance.

Код:
CMD:buypackage(playerid, params[])
{
	new package;
	new amount;
    if(!sscanf(params, "su", package, amount))
    {
        if(package == "WeaponDrop")
        {
            new float:math;
			math = amount*10;
			if(score[playerid] >= math)
			{
			    score[playerid] = score[playerid] - math;
			    SendClientMessage(playerid, gold, "WeaponDrop Purchased."

			}
			else
			{
			    SendClientMessage(playerid, gold, "Not enough points for this package, or the number you request is out of reach");
			}
		}
	}
	return 1;
}
C:\Server\gamemodes\new.pwn(401) : error 033: array must be indexed (variable "-unknown-")
C:\Server\gamemodes\new.pwn(405) : error 028: invalid subscript (not an array or too many subscripts): "score"
C:\Server\gamemodes\new.pwn(405) : warning 215: expression has no effect
C:\Server\gamemodes\new.pwn(405) : error 001: expected token: ";", but found "]"
C:\Server\gamemodes\new.pwn(405) : error 029: invalid expression, assumed zero
C:\Server\gamemodes\new.pwn(405) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
Need Help with Command for buying packages - by blackwidow18 - 07.06.2011, 14:10
Re: Need Help with Command for buying packages - by brett7 - 07.06.2011, 14:33
Re: Need Help with Command for buying packages - by blackwidow18 - 07.06.2011, 14:43
Re: Need Help with Command for buying packages - by Wesley221 - 07.06.2011, 15:05
Re: Need Help with Command for buying packages - by PrawkC - 07.06.2011, 15:51

Forum Jump:


Users browsing this thread: 3 Guest(s)