Help with getting player armour. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with getting player armour. (
/showthread.php?tid=197224)
Help with getting player armour. -
ZamaXor - 08.12.2010
Код:
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;
}
Re: Help with getting player armour. -
blackwave - 08.12.2010
Код:
public OnPlayerUpdate(playerid)
{
new Armour = GetPlayerArmour(playerid);
if(Armour == 100.0)
{
Ban(playerid);
}
return 1;
}
Re: Help with getting player armour. -
Baboon - 08.12.2010
what he said.
Re: Help with getting player armour. -
ZamaXor - 08.12.2010
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
Re: Help with getting player armour. -
blackwave - 08.12.2010
Код:
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.
Re: Help with getting player armour. -
ZamaXor - 08.12.2010
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
Re: Help with getting player armour. -
blackwave - 08.12.2010
Maybe test on the server? See if works at least
Re: Help with getting player armour. -
ZamaXor - 08.12.2010
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.
Re: Help with getting player armour. -
blackwave - 08.12.2010
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
Re: Help with getting player armour. -
ZamaXor - 08.12.2010
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.
Re: Help with getting player armour. -
blackwave - 08.12.2010
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