Author Topic: Ulx AutoPromote Lua Error  (Read 2077 times)

0 Members and 1 Guest are viewing this topic.

Offline someone920

  • Newbie
  • *
  • Posts: 47
  • Karma: 3
Ulx AutoPromote Lua Error
« on: January 23, 2010, 12:22:41 PM »
I've set up everything right and fixed a few errors myself, but I'm a bit concerned about touching this one seeing as i don't know much about lua. I keep getting this error in the console and I'm not quite sure how to fix it, can anyone tell me how?

Code: [Select]
Lua Error: Timer Error: ulx\modules/AutoPromote.lua:93: attempt to call field 'adduser'
Here's the actual code if it helps any

Code: [Select]
function promotePlayer( ply )
if not checkExcludes( ply ) then
cID = 1
if  groupSet( ply ) and not ply:IsUserGroup(groupTS) then
if settings[1].msgOn then
for ud, blank in pairs( player.GetAll()) do
ULib.tsayColor(player.GetAll()[ud],false,settings[1].msgcol,ply:Nick().." has been promoted to '"..promotes[cID-1].name.."'.")
end
end
cID = 1
if settings[1].effOn then
effectS( ply )
WorldSound( "autopromote/promote.wav", ply:GetPos( 0, 0, 0 ), 160, 100 )
end
ulx.adduser(nil, ply, groupTS)
--game.ConsoleCommand("ulx adduser "..string.format("%q", ply:Nick() ).." "..groupTS.."\n")
end
end
if not timer.IsTimer("Promotion-" ..tostring(ply:SteamID())) then
timer.Create("Promotion-" ..tostring(ply:SteamID()), 10, 0, promotePlayer, ply)
end
end

Thanks

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Ulx AutoPromote Lua Error
« Reply #1 on: January 23, 2010, 12:34:31 PM »
This should probably be asked in the autopromote thread from which you downloaded the version you have.
There are several different versions being discussed in the thread. See page 4 of Holographic Pizza's Autopromote.

Also, I'm not sure what version of ULX the autopromote scripts are made for.
Our current beta/SVN command structure is very different from our last release on our downloads page at www.ulyssesmod.net
That in and of itself may be causing errors.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline someone920

  • Newbie
  • *
  • Posts: 47
  • Karma: 3
Re: Ulx AutoPromote Lua Error
« Reply #2 on: January 23, 2010, 12:59:06 PM »
Will do, thanks for the help.