What's wrong with this?

I’m trying to make an achievement where you burn to death (Serverside achievements) but it’s not working.

[lua]
– Achievement #5 Android Hell
local ACH = {}
ACH.Type = ACHIEVEMENT_ONEOFF
ACH.Description = “Burn to death.”
ACH.Image = “gui/silkicons/bomb”
ACH.Target = 0
function ACH:PlayerDeath( ply, wep, kil )
if ( kil == “entityflame” or kil == “env_fire” ) then
self:Award( ply )
end
end
achievements.Register( “#misc”, “Android Hell”, ACH )[/lua]

When I get burnt, it doesn’t achieve, while my others do. Am I missing something? It doesn’t show any errors.

The second argument will be the fire entity, not the third.

What? Explain please MakeR. Wait you mean the wep?
Edit: Nope, still doesn’t work.

The PlayerDeath hook (which I assume is what is calling ACH.PlayerDeath) has three arguments:
-victim
-inflicter
-killer

Victim is the person who died.
Killer is the person who gets the credit for the kill.
Inflicter is the entity which caused the damage.

[editline]11:10AM[/editline]

Read the notes on the wiki about PlayerDeath.

**[Gamemode.PlayerDeath

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.PlayerDeath)**

I am. I get all my stuff from there. But when I switch it to killer it doesn’t work. Nor does Inflictor work

Well I am out of ideas then, maybe this should be posted in the Serverside achievements thread (if it exists).

Um you mean the one I’m using? It doesn’t exist. It never went official.

Ok, I’m sorry I couldn’t help.

Well you tried. :confused:

You’re being passed an entity and checking if it’s equal to a string.
**[Entity.GetClass

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.GetClass)**

I can’t believe I missed that.

I can’t believe you missed it either. :v:

:v:

Wait wait. So how do I use this? I’m not number 1 in lua coding if you know what I mean.

[lua]if inflicter:GetClass() == “entityflame” or inflicter:GetClass() == “env_fire” then
– Stuff.
end[/lua]

Oh thank you. Thank you too Lexic