dermaskin help

Hey, I need some help. In console it says this error:


gamemodes/GModRP/gamemode/derma/cl_dermaskin.lua:42: 'end' expected (to close 'function' at line 40) near 'else'
-- Error PARSING CLIENTSIDE file -------------------------
- File: GModRP/gamemode/derma/cl_dermaskin.lua
----------------------------------------------------------

Heres the code:



hook.Add( "Think", "ApplyPBDermaSkin", function()


	else
	
		hook.Remove( "Think", "ApplyPBDermaSkin" )
	
	end

end )

That’s only half an if condition :downs:

lol no if statement, why didn’t I see that :slight_smile:

EDIT:

if I add a “if” statement it still says same error. Where shall I place it?

Code:



if hook.Add( "Think", "ApplyPBDermaSkin", function()


	else
	
		hook.Remove( "Think", "ApplyPBDermaSkin" )
	
	end

end )

It would help if you explained to us what you were trying to do.

Thats what I don’t know xD
I’m just trying to fix the bugs for GmodRP Reloaded.

[lua]
hook.Add( “Think”, “ApplyPBDermaSkin”, function()

if
//Conditional goes here
else
//If the conditional isn't met then... 
    hook.Remove( "Think", "ApplyPBDermaSkin" )

end

end )[/lua]

I would advise you read www.lua.org/pil to understand the usage of the syntax etc.

Thanks, I really don’t see what the creator wants with this script :confused: