Hello everyone
I'm using dini and I'm trying to make a command which shows the cash of an offline player. But I'm getting an error. I've tried everything but I can't make it work..please help me! :(
Code:
Compile Error:
Help me please, I really don't know what to do. -Thanks in advance.
I'm using dini and I'm trying to make a command which shows the cash of an offline player. But I'm getting an error. I've tried everything but I can't make it work..please help me! :(
Code:
PHP Code:
CMD:getmoney(playerid, params[])
{
if(isnull(params)) {
return SendClientMessage(playerid, -1, "Correct Usage: /GetMoney [PlayerFile]");
}
new filename[MAX_PLAYER_NAME+18];
format(filename, sizeof(filename), "/ladmin/users/%s.sav", params);
if(!fexist(filename)) {
return SendClientMessage(playerid, -1, "That account doesn't exist!");
}
new
File:file = fopen(filename, io_read),
string[128],
Name[20],
Value[20],
Money;
while(fread(file, string)) {
if(!sscanf(string, "p<=>s[20]s[20]",Name, Value)) {
if(!strcmp(Name, "money")) { //HERE IS THE ERROR
Money = strval(Value);
break;
}
}
}
format(string, sizeof(string), "Money from %s's account is $%d", params, Money);
SendClientMessage(playerid, -1, string);
return true;
}
PHP Code:
error 035: argument type mismatch (argument 1)