30.01.2010, 10:16
i have defined everything setuped enumations e.t.c this is my command code :
these are the errors i get
pawn Код:
dcmd_withdraw(playerid,params[])
{
if (!udb_Exists(PlayerName(playerid))) return PlayerMsg(playerid,red,"You Must Be Registerd!");
if (udb_UserInt(PlayerName(playerid),"LoggedIn")== 0) return PlayerMsg(playerid,red,"You Must Be Logged In!");
if (strlen(params)==0) return PlayerMsg(playerid,red,"USAGE : '/withdraw howmuch'");
new Amout[255];
Amout = strval(params);
if (amout > udb_UserInt(PlayerName(playerid)"BankMoney")) return PlayerMsg(playerid,red,"Invalid Amout!");
}
else {
PlayerMsg(playerid,red,"THX For Useing The Bank!");
GivePlayerMoney(playerid,strval(params));
udb_UserSetInt(PlayerName(playerid),"BankMoney",udb_UserInt(PlayerName(playerid),"BankMoney")-strval(params));
return 0;
}
return 1;
}
Код:
C:\DOCUME~1\ADMINI~1\Desktop\SAMPSE~1\FILTER~1\admin.pwn(236) : error 033: array must be indexed (variable "Amout") C:\DOCUME~1\ADMINI~1\Desktop\SAMPSE~1\FILTER~1\admin.pwn(237) : error 017: undefined symbol "amout" C:\DOCUME~1\ADMINI~1\Desktop\SAMPSE~1\FILTER~1\admin.pwn(237) : warning 215: expression has no effect C:\DOCUME~1\ADMINI~1\Desktop\SAMPSE~1\FILTER~1\admin.pwn(237) : error 001: expected token: ";", but found ")" C:\DOCUME~1\ADMINI~1\Desktop\SAMPSE~1\FILTER~1\admin.pwn(237) : error 029: invalid expression, assumed zero C:\DOCUME~1\ADMINI~1\Desktop\SAMPSE~1\FILTER~1\admin.pwn(237) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.