Jump to content
  • Advertisement
Sign in to follow this  
darkhatter

This is going to sound really stupid but... involved LUA code question.

This topic is 2036 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

function killJoy( victim, weapon, killer )
    if  weapon:GetClass "kermite_knife_hibben"  then
        PrintMessage( HUD_PRINTTALK, victim:Name() .. " has died, mysteriously!" )
        killer:addMoney( 50 )
    end
end)
hook.Add("PlayerDeath", "rewards serial killer", killJoy)

 

 

 

where did i break code?   It has to do with a game called Garry's Mod, but i was told that people that write LUA might be able to 

shed some light in general.

 

I get this [ERROR] addons/darkrpmodification/lua/darkrp_modules/serialkiller/sh_killer.lua:6: unexpected symbol near ')'   

 

But i can't figure it out.

Edited by darkhatter

Share this post


Link to post
Share on other sites
Advertisement

I'm no LUA master, but what purpose does the ')' serve after the second end symbol?

 

Also, as an aside, changing the font face and color from the default without good reason is seen as abrasive to many, and code should go in code tags to preserve formatting.

Edited by Ectara

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!