07.06.2011, 14:10
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.
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
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(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