I'm currently working on a Derma Menu for one of my autorun scripts. I have my derma set up and everything, yet when I run it , It gives me a vgui error or a unknown command. Right now I set the command to fun_derma_menu And whenever I open it, it Tells me it's a unknown command in the chat.
Like Unknown Command: 'fun_derma_menu'
Sorry if I'm not giving enough information,If I need to,I'll post my script.
It worked once, then it just stopped and gave the error.
I hope this isn't the wrong section ><
[highlight](User was banned for this post ("Undescriptive thread title / wrong forum" - mahalis))[/highlight]
I have the same problem, what I know so far is that you should make sure you are running it via client side, and not server side. simple if( CLIENT ) and if( SERVER )
After it says in the console "Lua 5.1 Initialized" in yellow text, look for any errors.
I looked for "Lua 5.1 Initialized" And I didn't see it anywhere. I'm going to try using the if( SERVER )
and make it download. It's a serverside script for a server I co own. The function and such are called via serverside, the derma I want to be clientside.
Put this menu in your /lua/autorun/client if it isn't already.
In console type:
lua_openscript_cl autorun/client/file.lua
Replacing "file" with your filename, of course. This allows you to both update your script without restarting the map, and check for errors. It will tell you where the error is.
Yeah,I believe I put a older version in Shared or Client, so I'll have to check that.
I added in a area to make it download to clients, I believe it's
if ( SERVER ) then
AddCSLuaFile("autorun/client/new.lua")
end
I placed it back on the server under client and server.Then I reloaded it on the server and my self ( client ). It also auto downloads, but It still gives an unknown command when I it in console.
Should I post my code?
Is it in yellow? That means that the console command didn't get started on the client... I think...
Edit:
I figured it out. I just created 2 main files, 1 for the server and 1 for the client. I include them using lua/autorun/launcher.lua
[lua]if( SERVER ) then
AddCSLuaFile( "myaddon/cl_init.lua" )
AddCSLuaFile( "autorun/launcher.lua" )
include( "myaddon/sv_init.lua" )
elseif( CLIENT ) then
include( "myaddon/cl_init.lua" )
end[/lua]
and I used an AddCSLuaFile( "myaddon/cl_menu" ) in the sv_init.lua with cl_menu have the vgui and the concommand.Add()
Figured out the problem, was my own stupidity, guess I got banned for nothing :P
Sorry, you need to Log In to post a reply to this thread.