1. Simple SetPlayerHealth not working || 2. Unknown 'tag mismatch' warning.
#1

I set this timer for reducing a player's health every 10 seconds, (for testing).
It's a simple enough function, should work, but instead of reducing health, it kills my player, reduces the health to 0 directly.
I forwarded the function, set the timer correctly.
pawn Код:
forward LH(playerid); //At the top.
pawn Код:
SetTimer("LH",10000,true); //Under OnPlayerSpawn.
The function:
pawn Код:
public LH(playerid)
{
      new Float:health;
      SetPlayerHealth(playerid,GetPlayerHealth(playerid, health)-1);
     return 1;
}
---------------------------------------------------------------------
Problem 2:
pawn Код:
Line 1123: format(st,sizeof(st),"INSERT INTO `playerhouses` (`Price`, `xpos`, `ypos`, `zpos`, `virtualworld`, `labeltext`) VALUES ('%i','%f', '%f', '%f', '%i', `%s`)",HousePrice,hInfo[id][XPos],hInfo[id][YPos],hInfo[id][ZPos],hInfo[id][VirtualWorld],hInfo[id][HouseLabel]);
Quote:

C:\Users\Rajat\Desktop\SAMP\gamemodes\MySQL.pwn(11 23) : warning 213: tag mismatch

Gives a 'tag mismatch' warning. I removed all values one by one, and removing labeltext stopped the warning. In the enum, I defined 'HouseLabel' as Text3D, already.
--------------------------------------------------------------------
Help would be greatly appreciated!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)