Jump to content

NoHero

Members
  • Posts

    5
  • Joined

  • Last visited

NoHero's Achievements

Newbie

Newbie (1/14)

5

Reputation

  1. Ah i see thanks, confused me because when i looked at OOP in lua examples the class was constructed differently. I see now that there are a few ways of doing it.
  2. I was looking at sol's stats logger lua script and couldn't understand one thing, i hope it can be explained by someone. In the extra lib dblib.lua the table containing the functions, each function uses a variable called 'c' what is this? i.e: DB:Connect("dbname", "dbuser", "dbpassword", "dbhost", 3306) ['Connect'] = function ( c, DBName, DBUser, DBPass, DBAddr, Port ) require "luasql.mysql" c.env = assert( luasql.mysql() ) c.con = assert(c.env:connect(DBName, DBUser, DBPass, DBAddr, Port)) end, i hope sol doesn't mind me posting snippets what is c doing? some sort of namespace?
  3. Thanks for the tip, i will definitely use it since my next project will need to get XP again.
  4. Thanks, that was messing me up everything was working i just didn't realise ^^
  5. I was originally asked to modify a autolevel lua script seen the same script in slight different forms around the internet. Thing is both in the original scrip and my modified one i get the same problem: return et.gentity_get(pID, "ps.persistant", 0) returns 0 when the players XP is not 0. Is ps.persistant the right fieldname for XP? I bypassed this section of code and everything else in my script works last nail to be done before implementing it.
  6. Welcome to the forums NoHero :)
×
×
  • Create New...