What is wrong with this code?

[lua]

if ply:GetFrags > 10 then
ply:Give( "weapon_crowbar" )

end
[/lua]

The error



FY/gamemode/init.lua:26: function arguments expected near '>'


You need “()” after “GetFrags()”. So,

[lua]if ply:Frags() > 10 then
ply:Give( “weapon_crowbar” )
end[/lua]

Ah i knew it would be something silly like that.

WAITWAITWAIT

GetFrags() isn’t a function. It’s just Frags().

Well, that may be an issue there, however, it isnt the one being complained about.


FY/gamemode/init.lua:26: function arguments expected near '>'

the error anyway, is directing you to line 26 which you are not showing us if I am not mistake :slight_smile:

Darkness: The error was that Player:Frags() is a function, he was missing brackets as Entoros said.

The errors posted were already solved.

Sorry i did notice that and fix it with out updating this thread, but the problem is fixed now.