I found this code that adds classes to Lua. I throw it in my lua/include/modules folder and tried to require it my entity. The console spits out this error. "Couldn't include file 'includes\modules\class.lua' (File not found) (@gamemodes/base/entities/entities/bot_sas.lua (line 3))". Am I doing it wrong?
Code:
[url]https://github.com/andrewmcwatters/lclass[/url]
[lua]AddCSLuaFile()
include( "grunt_sentence.lua" )
require("class")
ENT.Base = "base_nextbot"
ENT.Spawnable = true
[/lua]
Is the error client-side error?(yellow) If so, be sure to AddCSLuaFile() includes\modules\class.lua too
That fixed it. Thanks!
Sorry, you need to Log In to post a reply to this thread.