[Lua] surface.CreateFont - attempt to index global 'surface' ?

I’m not sure why I’m getting this error.


surface.CreateFont( "TestFont", {
 font = "Arial",
 size = 17,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true,
 underline = false,
 italic = false,
 strikeout = false,
 symbol = false,
 rotary = false,
 shadow = true,
 additive = false,
 outline = true
} )

You sure you’re doing this clientside?

Oh thanks, that’s probably it. : )

If I recall, place it inside a ‘If CLIENT then end’ statement and it should be okay.

That’s exactly what I did. Thanks to both of you.