Author Topic: Report Module 1.3  (Read 62946 times)

0 Members and 1 Guest are viewing this topic.

Offline Jussy

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Report Module 1.3
« Reply #30 on: May 21, 2013, 02:10:57 PM »
Ahh for some reason it messes up my servers jobs, i cant click on them :P ill just have to wait till hopefully an update comes out for this reporter :) but thnx man :)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Report Module 1.3
« Reply #31 on: May 21, 2013, 02:16:14 PM »
Not only is this release older than the Gmod 13 update, it's older than our Ulib re-write of (2011?)

* JamminR hijacks thread with post related nothing to original topic.
I don't know how to code, I'm sorry.  ::)
* JamminR thinks "ah HA! There WERE negative effects."


* JamminR continues laughing aloud at the joke MrP made.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline bender180

  • Full Member
  • ***
  • Posts: 217
  • Karma: 42
    • Benders Villa
Re: Report Module 1.3
« Reply #32 on: May 21, 2013, 05:05:15 PM »
so i want to try and attempt to update this as i think it might be useful to me, do you think it would be better for me to rewrite it from scratch or update the existing code. I started updating existing code ive been getting this error

Code: [Select]
[ERROR] addons/ulx/lua/ulx/modules/sh/reports.lua:46: attempt to call field 'convar' (a nil value)
i think its because im creating the convars incorrectly

Code: [Select]
-- Easy Config:
local ReportsEnabled = "1" -- Set this to 0 if you want to disable this script
local ReportsInLogs = "1" -- Set this to 0 if you don't want to log reports in daily logs
local ReportsInterval = "120" -- The player can only report once then he need to wait this interval (seconds) before reporting again. 0 = no delay (not recommended)
local ReportsFolder = "ulx_logs" -- By default, in the same folder as others log files
-- End of config


local ReportsEnabled = ulx.convar( "ReportsEnabled", "1", "<0-1> - Set this to 0 if you want to disable the report command.", ULib.ACCESS_ADMIN)
local reportsInLogs = ulx.convar( "reportsInLogs", "1", "<0-1> - Set this to 0 if you don't want to log reports in daily logs.", ULib.ACCESS_ADMIN )
local ReportsInterval = ulx.convar( "ReportsInterval", "120", "<time> - Time between 2 reports from the same player. Set this to 0 to disable.", ULib.ACCESS_SUPERADMIN )
local ReportsFolder = ulx.convar( "ReportsFolder", "ulx_logs", "<folder> - The folder where to save the reports file.", ULib.ACCESS_SUPERADMIN )


Any help/suggestions would be great as ive never used a convar before.
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.

Offline Vilusia

  • Newbie
  • *
  • Posts: 7
  • Karma: -1
Re: Report Module 1.3
« Reply #33 on: May 21, 2013, 05:42:25 PM »
Code: [Select]
[ERROR] addons/ulx/lua/ulx/modules/sh/reports.lua:46: attempt to call field 'convar' (a nil value)
  1. unknown - addons/ulx/lua/ulx/modules/sh/reports.lua:46
   2. include - [C]:-1
    3. unknown - addons/ulx/lua/ulx/cl_init.lua:17
     4. include - [C]:-1
      5. unknown - addons/ulx/lua/ulib/modules/ulx_init.lua:4
       6. include - [C]:-1
        7. unknown - addons/ulib/lua/ulib/cl_init.lua:23
         8. include - [C]:-1
          9. unknown - addons/ulib/lua/autorun/ulib_init.lua:5

Getting this.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Report Module 1.3
« Reply #34 on: May 21, 2013, 07:41:42 PM »
Vilusia, read the second page of this thread....it's not compatible with Ulib 2.5 or Gmod 13. and the post above yours only indicates he's thinking about making it work (whether by scratch or by rewrite)

Bender, Best of both worlds.
To rewrite the ULX commands themselves, you almost have to rewrite the functions anyway.
As for convar structure, I'd have to remind myself how we do it.

EDIT- If ULX had a documents site like Ulib does at ulyssesmod.net/docs, here's what it would say about ulx.convar
Code: [Select]
--[[
Function: convar

This is what will set up ULX's convars, it makes them under the command "ulx"

Parameters:

command - The console command. IE, "sv_kickminge".
value - The value to start off at.
help - *(Optional)* A help string for using the command.
access - *(Optional, defaults to ACCESS_ALL)* Restricted access.
]]

My guess, you're defining the same variables twice. Once as a string or number, then as a convar.
« Last Edit: May 21, 2013, 07:57:27 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline bender180

  • Full Member
  • ***
  • Posts: 217
  • Karma: 42
    • Benders Villa
Re: Report Module 1.3
« Reply #35 on: May 21, 2013, 08:51:10 PM »
Thank you that should help also will there ever be a ulx docs site like ulib?
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.

Offline Vilusia

  • Newbie
  • *
  • Posts: 7
  • Karma: -1
Re: Report Module 1.3
« Reply #36 on: May 22, 2013, 02:46:22 AM »
Sorry about that I misread what he said :P

Offline Jussy

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Report Module 1.3
« Reply #37 on: May 22, 2013, 09:12:43 AM »
Ok Well If You Ever Get This To Work, Could You Post It On The Forums ?? That Would Be Awesome :)

Offline SuperAero_

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Re: Report Module 1.3
« Reply #38 on: May 26, 2013, 03:53:36 AM »
Great Release

Offline bender180

  • Full Member
  • ***
  • Posts: 217
  • Karma: 42
    • Benders Villa
Re: Report Module 1.3
« Reply #39 on: June 03, 2013, 11:57:50 AM »
just an update i still am working on patching this up ive got it almost 100% ive just been busy with school and haven't had much time to do anything lua related.
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.

Offline nak0604

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: Report Module 1.3
« Reply #40 on: July 29, 2013, 08:34:20 PM »
I get this error when i start my server now

http://pastebin.com/56xjSJNW