[FONT ISSUE] attempt to index global 'surface'

Hello GMAD! This is my first post so go Easy on me!

So I am trying to use a custom font on a friend’s server we are working on and I have followed the advice of this thread: [http://forum.facepunch.com/showthread.php?t=1196247]
& this article on the wiki [http://wiki.garrysmod.com/page/surface/CreateFont]

In the end I imported this font [http://www.fontspace.com/tension-type/overspray] to \garrysmod\resource\fonts

And added this import code:


resource.AddFile("resouce/fonts/Overspray.ttf")

After this I attempted to initialize the font with this call **(This is where the issue lies) **


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

And then I referenced the font in the Draw object’s DrawText method using this code:



draw.DrawText(War:GetTeamName(2), “Oversprayed”, CenterX + 20, CenterY + fontsize * 0.5, Color(255, 255, 255, 100), TEXT_ALIGN_LEFT)



*Much of the above information is not necessary to understand what went wrong but I have included it for those curious. *

The error is:
[ERROR] addons/war/lua/autorun/wars.lua:7: attempt to index global ‘surface’ (a nil value)

  1. unknown - addons/war/lua/autorun/wars.lua:7

I think this might be because I am running a client side script on the server side.
***Why I present this to you, is that I have no clue how to solve it!! ***

THANKS IN ADVANCE

-Texas Writer

Put the clientside file in lua/autorun/client instead of autorun or server.

Also, you can remove all of these since they are set by default:



    underline = false,
    italic = false,
    strikeout = false,
    symbol = false,
    rotary = false,
    shadow = false,
    additive = false,
    outline = false,