Error 035
#1

What is this error? It says that there is an 'error 035: argument type mismatch' on the giveplayermoney line (argument 1).
Код:
	if(!strcmp(cmd, "/gm"))
	{
		new Float:receiver[MAX_PLAYER_NAME];
		new Float:amount[10];
		GivePlayerMoney(receiver,amount);
		return 1;
	}
Reply
#2

Use GivePlayerMoney like this:

pawn Код:
GivePlayerMoney(playerid, 10000);
Reply
#3

pawn Код:
if(!strcmp(cmd, "/gm"))
    {
        new receiver[MAX_PLAYER_NAME];
        new amount[10];
        GivePlayerMoney(receiver,amount);
        return 1;
    }
Money or playerid are not floats they are ints. That command will also not work. Read some tutorials.
Reply
#4

Okay, I will try that first.
Reply
#5

Well, it keeps me telling 'argument 1 mismatch'.
Reply
#6

How silly of me i never noticed you was using an array.
pawn Код:
if(!strcmp(cmd, "/gm"))
    {
        new receiver;
        new amount;
        GivePlayerMoney(receiver,amount);
        return 1;
    }
That'll remove the warning but the command still wont work because the variables don't hold any values.
Reply
#7

But I used sscanf for the parameters.
Reply
#8

Thanks iggy1, it worked perfectly for me!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)