Help with getting player armour.
#1

Код:
error 035: argument type mismatch (argument 2)
pawn Код:
public OnPlayerUpdate(playerid)
{
    new Armour = GetPlayerArmour(playerid, 100.0);
    if(Armour == 100.0)
    {
    Ban(playerid);
    }
    return 1;
}
Reply
#2

Код:
public OnPlayerUpdate(playerid)
{
    new Armour = GetPlayerArmour(playerid);
    if(Armour == 100.0)
    {
    Ban(playerid);
    }
    return 1;
}
Reply
#3

what he said.
Reply
#4

Quote:
Originally Posted by blackwave
Посмотреть сообщение
Код:
public OnPlayerUpdate(playerid)
{
    new Armour = GetPlayerArmour(playerid);
    if(Armour == 100.0)
    {
    Ban(playerid);
    }
    return 1;
}
Код:
warning 202: number of arguments does not match definition
Reply
#5

Код:
public OnPlayerUpdate(playerid)
{
    new Armour; Armour = GetPlayerArmour(playerid);
    if(Armour == 100)
    {
    Ban(playerid);
    }
    return 1;
}
This warning wouldn't make it dont work. Means the number of "things/arguments" on the function doesn't has definition. Try this, maybe.
Reply
#6

Quote:
Originally Posted by blackwave
Посмотреть сообщение
Код:
public OnPlayerUpdate(playerid)
{
    new Armour; Armour = GetPlayerArmour(playerid);
    if(Armour == 100)
    {
    Ban(playerid);
    }
    return 1;
}
This warning wouldn't make it dont work. Means the number of "things/arguments" on the function doesn't has definition. Try this, maybe.
Same warning
Reply
#7

Maybe test on the server? See if works at least
Reply
#8

Quote:
Originally Posted by blackwave
Посмотреть сообщение
Maybe test on the server? See if works at least
pawn Код:
public OnPlayerUpdate(playerid)
{
    new Float:armour;
    new Armour = GetPlayerArmour(playerid, armour);
    if(Armour == 100.0){
    Ban(playerid);}
    return 1;
}
This one compile good.
Reply
#9

You get confused with english a bit, I think =S. Try it:
Код:
public OnPlayerUpdate(playerid)
{
    new Float:armour;
    GetPlayerArmour(playerid, armour);
    if(Armour == 100.0)
    {
    Ban(playerid);
    }
    return 1;
}
Try this one, and test
Reply
#10

Quote:
Originally Posted by blackwave
Посмотреть сообщение
You get confused with english a bit, I think =S. Try it:
Код:
public OnPlayerUpdate(playerid)
{
    new Float:armour;
    GetPlayerArmour(playerid, armour);
    if(Armour == 100.0)
    {
    Ban(playerid);
    }
    return 1;
}
Try this one, and test
tnx it works good.
Reply
#11

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
I love the irony of you highlighting "test" when you yourself clearly failed to follow that advice - warnings are there for a reason and often indicate code which won't work! Don't just ignore them.
Sometimes does works, sometimes doesn't. In this case did work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)