Lua error

So, i’m getting an odd lua error on the gamemode i’m coding.

Here it is:



[ERROR] gamemodes/example/gamemode/init.lua:26: attempt to call method 'database
Check' (a nil value)
  1. unknown - gamemodes/example/gamemode/init.lua:26


The function you’re calling in init.lua on line 26 doesn’t exist. You may be trying to call the function before you included the files.

Here’s a skeleton game-mode, part of one I’m about to open up on bitbucket; this doesn’t have any thing except the 3 inclusion files, a folder structure and a few other things:

https://dl.dropboxusercontent.com/u/26074909/tutoring/_redistributable/basedev_gamemode.rar

It will recursively and automatically include files located in client, server, and shared folders; additionally there is a content/maps/ directory, it’ll load maps/<current_map_name>/ folder automatically to.

I am posting this because your error has “example” listed as the gamemode.

What is so “odd” about it? You are calling a function that doesn’t exist on line 26 in init.lua.