ULX

Author Topic: Help with a lua  (Read 6061 times)

0 Members and 2 Guests are viewing this topic.

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Help with a lua
« on: June 16, 2011, 09:30:51 AM »
What it should do is when i type !minge (players name) in chat it should add that person to the ulx group minge
This will not work and i cant find it to enable it for superadmins


made by JusticeInACan

Code: [Select]
// save this as minge.lua in the folder garrysmod/garrysmod/addons/ulx/lua/ulx/modules/sh/ and give the ulx minge right to yourself

local CATEGORY_NAME = "User Management"

local function ulx.mingeuser(ply,target)
ulx.adduser(ply,target,"minge")
end

local mingeuser = ulx.command( CATEGORY_NAME, "ulx minge", ulx.mingeuser )
mingeuser:addParam{ type=ULib.cmds.PlayerArg }
mingeuser:defaultAccess( ULib.ACCESS_SUPERADMIN )
mingeuser:help("Turn a user into a minge." )


« Last Edit: June 16, 2011, 02:52:58 PM by killforfun »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Help with a lua
« Reply #1 on: June 16, 2011, 01:27:55 PM »
Give us more details than "it doesn't work". Are there errors in the client or server console?
Experiencing God's grace one day at a time.

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Help with a lua
« Reply #2 on: June 16, 2011, 01:57:15 PM »
this is all that's in my console from start up

Code: [Select]
memode 'sandbox' derived from 'base'
--- Missing Vgui material texturemissing
Sending 1339 'User Info' ConVars to server (cl_spewuserinfoconvars to see)
Scanning for downloaded fonts..
Reloading Particles..
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1_min_depth_nearcull
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1_min_depth_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1_min_depth_nearcull
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1_min_depth_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/spray1/spray1_streak
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/spray1/spray1_streak
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1_add_nearcull
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1_add_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1_add_nearcull
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1_add_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1/vistasmokev1_fire2
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1/vistasmokev1_fire2
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1/vistasmokev4_nearcull
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1/vistasmokev4_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1/vistasmokev4_nearcull
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1/vistasmokev4_nearcull
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1/vistasmokev4_addself_nearcull
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1/vistasmokev4_addself_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1/vistasmokev4_addself_nearcull
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1/vistasmokev4_addself_nearcull
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/spray1/spray1_addself
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/spray1/spray1_addself
unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1_fog_add
unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1_fog_add
unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1_fog_add
unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1_fog_add
Client "[?l?l?]kill for fun" spawned in server (74.182.177.26:58717)<STEAM_0:0:15674006>.
Welcome to Spektrum|build|24/7| ! We're playing gm_construct.
[UTime]Welcome back [?l?l?]kill for fun, you last played on this server 06/16/11 14:36:55
Physgun build mode is available on this server
PlayX DEBUG: JW URL set
PlayX DEBUG: Host URL set
[ThreeD] Starting...
PlayX DEBUG: Providers list received
ULX version <SVN> revision 14 loaded.
RunConsoleCommand blocked - sent before player spawned (ZLib_Installed)

///////////////////////////////////////
//  ULX GUI -- Made by Stickly Man!  //
///////////////////////////////////////
// Loading GUI Modules...            //
//   bans.lua                        //
//   commands.lua                    //
//   groups.lua                      //
//   maps.lua                        //
//   settings.lua                    //
// Loading Setting Modules...        //
//   client.lua                      //
//   cl_apromote.lua                 //
//   server.lua                      //
// Loading Gamemode Module(s)...     //
//   sandbox.lua                     //
// Modules Loaded!                   //
///////////////////////////////////////

Redownloading all lightmaps
Error Vertex File for 'Holograms/plane.mdl' checksum 647644133 should be -1495644899
RunConsoleCommand blocked - sent before player spawned (ZLib_Installed)
Unknown command: resize_allow
RunConsoleCommand blocked - sent before player spawned (ZLib_Installed)
I

and nun of it seems to be a error

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Help with a lua
« Reply #3 on: June 16, 2011, 02:29:51 PM »
I don't see you trying to use the command in there, and I'm assuming this output is from your client.

Also, where are you putting this file?
Experiencing God's grace one day at a time.

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Help with a lua
« Reply #4 on: June 16, 2011, 02:51:02 PM »
I'm saving it  as minge.lua in the folder garrysmod/garrysmod/addons/ulx/lua/ulx/modules/sh/
in my server files
also a had typo on the information above

 it should at that person to the ulx group minge
"should say"
 it should add* that person to the ulx group minge

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Help with a lua
« Reply #5 on: June 16, 2011, 03:41:19 PM »
Again, I don't see you attempting to use the command.
Experiencing God's grace one day at a time.

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Help with a lua
« Reply #6 on: June 16, 2011, 04:45:08 PM »
all i get when i type !minge Bot01 in chat is
killforfun: !minge Bot01

and when i type ulx mine in consol nothing shows up just unknown command

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Help with a lua
« Reply #7 on: June 16, 2011, 05:49:43 PM »
Show us your server console log from startup
Experiencing God's grace one day at a time.

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Help with a lua
« Reply #8 on: June 16, 2011, 09:01:37 PM »
Here are my lua errors that was loged in my garrysmod/garrysmod/logs/l0616003.log
and some of them are talking about the minge.lua file

Code: [Select]
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\act.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\ai_caps.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\ai_schedule.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\collision_group.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\contents.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\cvar.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\disposition.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\dmg_type.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\hitgroup.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\hull_types.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\keys.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\mask.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\mousecode.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\movecollide.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\movetype.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\npc_state.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\obs_mode.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\player_anim.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: Couldn't include file 'includes\enum\solid.lua' (File not found) (<nowhere>)
L 06/16/2011 - 22:49:22: Lua Error: [addons\steeringwheelpack\lua\autorun\steeringwheelpack.lua:1] ')' expected near '.'
L 06/16/2011 - 22:49:23: Lua Error: [addons\ulx\lua\ulx\modules\sh\minge.lua:5] '(' expected near '.'
L 06/16/2011 - 22:49:23: Lua Error: [addons\ulx\lua\ulx\modules\sh\minge.lua:5] '(' expected near '.'
L 06/16/2011 - 22:49:23: Lua Error: [addons\ulx\lua\ulx\init.lua:50] ERROR PARSING CLIENTSIDE FILE: 'ulx\modules\sh\minge.lua'
L 06/16/2011 - 22:49:24: Lua Error: [addons\wiresocketrad\lua\includes\modules\socket.lua:14] attempt to call global 'Socket' (a nil value)
L 06/16/2011 - 22:49:24: Load Gamemode: 'sandbox'
L 06/16/2011 - 22:49:29: Lua Error: Skipping E2 extension 'holoanim'.
L 06/16/2011 - 22:49:29: Lua Error: Skipping E2 extension 'propcore'.
L 06/16/2011 - 22:49:29: Lua Error: Skipping E2 extension 'tracesystem'.
L 06/16/2011 - 22:49:32: server_cvar: "sv_tags" "PAC2"
L 06/16/2011 - 22:49:32: server_cvar: "sv_tags" "PAC2"
L 06/16/2011 - 22:49:32: server_cvar: "sv_tags" "wsr"
L 06/16/2011 - 22:49:32: server_cvar: "sv_tags" "wsr"
L 06/16/2011 - 22:49:34: server_cvar: "sv_tags" "gm:sandbox,wsr"
L 06/16/2011 - 22:49:34: server_cvar: "sv_tags" "garrysmod124,gm:sandbox,wsr"
L 06/16/2011 - 22:49:34: server_cvar: "sv_tags" "alltalk,garrysmod124,gm:sandbox,wsr"
L 06/16/2011 - 22:49:34: Lua Error: [addons\wire\lua\entities\gmod_wire_expression2\core\e2lib.lua:445] attempt to call method 'PrintMessage' (a nil value)
L 06/16/2011 - 22:49:34: Log file closed
(

To make it easier for ya these are the ones talking about the file minge.lua

Code: [Select]
L 06/16/2011 - 22:49:23: Lua Error: [addons\ulx\lua\ulx\modules\sh\minge.lua:5] '(' expected near '.'
L 06/16/2011 - 22:49:23: Lua Error: [addons\ulx\lua\ulx\modules\sh\minge.lua:5] '(' expected near '.'
L 06/16/2011 - 22:49:23: Lua Error: [addons\ulx\lua\ulx\init.lua:50] ERROR PARSING CLIENTSIDE FILE: 'ulx\modules\sh\minge.lua'

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Help with a lua
« Reply #9 on: June 16, 2011, 09:06:23 PM »
Without even looking at your log:

Code: [Select]
local CATEGORY_NAME = "User Management"

function ulx.mingeuser( ply,target )
ulx.adduser(ply,target,"minge")
end

local mingeuser = ulx.command( CATEGORY_NAME, "ulx minge", ulx.mingeuser )
mingeuser:addParam{ type=ULib.cmds.PlayerArg }
mingeuser:defaultAccess( ULib.ACCESS_SUPERADMIN )
mingeuser:help("Turn a user into a minge." )

Your function cannot be local.

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Help with a lua
« Reply #10 on: June 16, 2011, 11:23:57 PM »
yup this worked "but"
it showed up in the ulx menu and worked but i cant use command !minge (player)

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Help with a lua
« Reply #11 on: June 17, 2011, 04:19:11 AM »
yup this worked "but"
it showed up in the ulx menu and worked but i cant use command !minge (player)

Show us your server/client logs again.
Experiencing God's grace one day at a time.

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Help with a lua
« Reply #12 on: June 17, 2011, 10:26:07 AM »
Code: [Select]
local CATEGORY_NAME = "User Management"

function ulx.mingeuser( ply, target )
ulx.adduser( ply, target, "minge")
end

local mingeuser = ulx.command( CATEGORY_NAME, "ulx minge", ulx.mingeuser, "!minge" )
mingeuser:addParam{ type=ULib.cmds.PlayerArg }
mingeuser:defaultAccess( ULib.ACCESS_SUPERADMIN )
mingeuser:help("Turns a user into a minge." )

 ::)


EDIT:  Tested - Works fine.
« Last Edit: June 17, 2011, 10:38:36 AM by Aaron113 »