SetPlayerArmour(playerid, 5);
SetPlayerArmour(playerid, +5);
new Float:Armour;//define a floating variable with a name Armour.
GetPlayerArmour(playerid,Armour);//Store the value of player's armour in this variable using GetPlayerArmour function.
SetPlayerArmour(playerid,Armour + 5);// You need to add current Armour + 5 to do your task in SetPlayerArmour function.
C:\Users\Xsyiaris\Documents\VPS\Penitentiary Roleplay\gamemodes\PRP.pwn(4264) : warning 219: local variable "Armour" shadows a variable at a preceding level
C:\Users\Xsyiaris\Documents\VPS\Penitentiary Roleplay\gamemodes\PRP.pwn(4265) : error 035: argument type mismatch (argument 2)
C:\Users\Xsyiaris\Documents\VPS\Penitentiary Roleplay\gamemodes\PRP.pwn(4266) : warning 213: tag mismatch
C:\Users\Xsyiaris\Documents\VPS\Penitentiary Roleplay\gamemodes\PRP.pwn(4266) : warning 213: tag mismatch
C:\Users\Xsyiaris\Documents\VPS\Penitentiary Roleplay\gamemodes\PRP.pwn(4264) : warning 203: symbol is never used: "Armour"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
new string[64]; //Line 4263
new Float:Armour; //Line 4264
GetPlayerArmour(playerid,Armour); //Line 4265
SetPlayerArmour(playerid,Armour + 5); //Line 4266
format(string, sizeof(string), "* %s takes out a lighter and a joint and smokes it", GetICName(playerid)); //Line 4267
SendNearByMessage(playerid, ACTION_COLOR, string, 10); //Line 4268
SetPlayerDrunkLevel (playerid, 4500); //Line 4269
SetTimer("CurrentlyHigh", 180000, false); //Line 4270
PlayerStat[playerid][Joint]--; //Line 4271
new
Float: fArmour
;
GetPlayerArmour( playerid, fArmour );
SetPlayerArmour( playerid, fArmour + 5 );
I guess it's declared as global without the Float tag. Change the name:
pawn Код:
|