Hey facepunch! I am finally going to start learning some lua! I am trying to create a small gamemode sort of like GTA. I am having trouble doing the slightest of things, and it is getting annoying. Can you please check this snippet of code to see if anything is wrong? ( I know its wrong)
Code for adding stars when someone gets damaged:
function GM:EntityTakeDamage(ent, inflictor, attacker, amount, dmginfo) if ent:IsPlayer() and attacker:IsPlayer() then v:AddStars(1) end end
Help a noob out? I am still confused about how k, v in pairs works, can you help me out!?