the lua runned with no problems, execpt when i type addon_menu on console it says Lua Error: autorun/server/almostover.lua:61: attemp to index global 'vgui' <a nil value>
:3
[lua]local function AddonMenu()
local frame = vgui.Create("DFrame")
frame:SetSize(200,600)
frame:Center()
frame:MakePopup()
frame:SetTitle("Addon List")
local list = vgui.Create("DListView",frame)
list:SetPos(10,30)
list:SetSize(frame:GetWide()-20,frame:GetTall()-50)
list:AddColumn("Addon Name")
for _,v in ipairs(GetAddonList()) do list:AddLine(v) end
end
concommand.Add("addon_menu",AddonMenu)[/lua]
This. Take it out of the code in the /autorun/server, and put it in a new code in the /autorun/client.
testing..yeah I know this is boring, thank you by taking your time helping me : )
feel free to join my server(when u arrive home) and become admin ^^
No problem.
Cool, thanks. What's the IP?
same problem happens : /, and now I see that the chat commands aren't working, don't give up !
[editline]04:29AM[/editline]
np 187.37.53.136:27015
[editline]04:39AM[/editline]
a random question.. is my avatar dumb or funny?
Wait, so what's the error now? Just nothing happens?
Erm, is NAB supposed to mean something?
Lua Error: autorun/server/almostover.lua:2: attemp to index global 'vgui' <a nil value>
(but then can I put it back to the lua file in autorun/server?)
when I made this avatar i tought nab was a legum or a fruit lol...
[editline]04:50AM[/editline]
nothing happens aparently but the dedicated server console show that error, and the chat commands don't work
[editline]04:57AM[/editline]
the reason for I want to take the command back to autorun/server/almostdone.lua file is because I don't know how to remove the addon code without fu$%#$¨ everything up :c
[editline]05:00AM[/editline]
oh god, I have ulx and I see that all the chats commands stopped working after that lua fille loaded O.O
[editline]05:20AM[/editline]
where are you? D:
[QUOTE=hellguy;16066037]yes you can, when some folder is svn ex: ph3
theres a hidden folder named ".svn" ;D.[/QUOTE]
You need to export. It will make your server faster and more stable. [url]http://www.facepunch.com/showthread.php?t=688324[/url]
Can I see all your code?
[url]http://pastebin.com/m728449f5[/url]
export? didn't get it..what export does?
[editline]04:24PM[/editline]
oh I understand.. but I download the svn directly into my addons folder :3 no need to export
I know how to make some tool donator-only-tool but I need to put the name that appears in the tool menu or a nother kind of name? thx
[editline]05:11PM[/editline]
why can't I just copy the svn to the folder, why It's better export?
The exported file it's not svn, so when I update the original svn it'll update the exported too?
any one?
[QUOTE=hellguy;16077101][url]http://pastebin.com/m728449f5[/url]
export? didn't get it..what export does?
[editline]04:24PM[/editline]
oh I understand.. but I download the svn directly into my addons folder :3 no need to export
I know how to make some tool donator-only-tool but I need to put the name that appears in the tool menu or a nother kind of name? thx
[editline]05:11PM[/editline]
why can't I just copy the svn to the folder, why It's better export?
The exported file it's not svn, so when I update the original svn it'll update the exported too?[/QUOTE]
I've written in the tutorial why it is better to export. I'm not going to tell you all over again.
I'll take a look at the code sometime, but not at the moment.
ok
*waiting for coders help*:3
fucki** sad! 1 coder banned, and the other one "not here" at the moment..:/
[url]http://www.filefactory.com/file/ahd84hc/n/ServerAddons_zip[/url]
Here. I fixed the menu, and I think I fixed the chat command detector as well.
My comp apparently doesn't want to open the zip file now, so could you just put that stuff in pastebin, please? (also, which post was I banned for...?)
I think overv's pastebin looks cooler :)
Server side file: (addons/serverstuff/lua/autorun/server/serverstuff.lua)
[url]http://code.overvprojects.nl/viewcode.php?id=255[/url]
Client side file: (addons/serverstuff/lua/autorun/client/menu.lua)
[url]http://code.overvprojects.nl/viewcode.php?id=256[/url]
Oh crap I forgot to select Lua highlighting. Oh well there's a box at the bottom that lets you change.
^ Looks fine. Use that, hellguy.
I can't test them right now, my steam acc got hacked, until I get it back by steam support I won't be able to test it..
[QUOTE=hellguy;16102493]I can't test them right now, my steam acc got hacked, until I get it back by steam support I won't be able to test it..[/QUOTE]
Epic fail.
That's why you never tell anyone your password physcally, and why you never type down your password on any website EVER. I ONLY type in my password on steam when trying to log on. (And a few times on the steam support site when I wanted to ask for help, but that was only after double and triple checking that it was the actual site)
yea epic fail, ok i got my steam acc back, no the funnyest part is that i didn't put on any website or shit, it was my ex-girlfriend that did that, lol.. ok lets talk about other thing
ulx chatcommands now work, but not !addonsmenu, !donator, !comment, addon_menu console command either.But at least it blocks the donators tools for not-donators, and the donator weps for not-donators also.
I think the problem is that you're using conflicting prefixes to your commands. When you accompany something with "!", ulx tries to butt in and check whether it's ULX or not and then shut down if it isn't. You need to use a different prefix if you want it to work, or code this stuff into the ulx code.
changed from "!" to "." , still not working.
Yeah, the chat commands did not work for me when I tried them, Entoros.
Huh. That's odd.
[lua]hook.Add("PlayerSay","Chatcommands",function(ply,text,toall)
if string.Left(text,2) == "**" then
local str = string.sub(text,3,string.len(text))
for _,v in ipairs(chatcommands) do if str == v[1] then
if type(v[2]) == "string" then ply:ConCommand(v[2].." "..str) else v[2](str,ply) end end
end
return
else return text end
end)[/lua]
Try that one instead. Prefix commands with "**".
*edit* OH WAIT! I realize the problem. We never returned in the if part of the statement. :v:
Yeah, with your current code, just put "return" at the end of the if statement, like above.
[QUOTE=Entoros;16118932]Huh. That's odd.
[lua]hook.Add("PlayerSay","Chatcommands",function(ply,text,toall)
if string.Left(text,2) == "**" then
local str = string.sub(text,3,string.len(text))
for _,v in ipairs(chatcommands) do if str == v[1] then
if type(v[2]) == "string" then ply:ConCommand(v[2].." "..str) else v[2](str,ply) end end
end
return
else return text end
end)[/lua]
Try that one instead. Prefix commands with "**".
*edit* OH WAIT! I realize the problem. We never returned in the if part of the statement. :v:
Yeah, with your current code, just put "return" at the end of the if statement, like above.[/QUOTE]
Look at my fix. In your code you have
[code]else return text end[/code]
This will break other commands. I did the same thing on my first try, but Overv explained that it would fuck up other commands. And he was right. I tried DarkRP on my server, and all the DarkRP commands (They even use a different prefix! They use /.) were broken because of my code. Then I simply removed return text and it worked again.
When I changed the code, I simply removed that part. And I tried !addonsmenu and it worked fine for me. The other commands didn't work, though.
I'm testing it right now, I hope no one launch this at a addon yet. It's something public but don't take any credits for it (except entoros & divran of course)
[editline]04:01PM[/editline]
yeah u right the commands still not working and now even ulx commands works ^^'
[editline]04:14PM[/editline]
tryed removing [code]else return text end[/code] still not working ;c
[QUOTE=hellguy;16120512]I'm testing it right now, I hope no one launch this at a addon yet. It's something public but don't take any credits for it (except entoros & divran of course)
[editline]04:01PM[/editline]
yeah u right the commands still not working and now even ulx commands works ^^'
[editline]04:14PM[/editline]
tryed removing [code]else return text end[/code] still not working ;c[/QUOTE]
Just use the chat detector I fixed. It's in the Server side file on here:
[QUOTE=Divran;16096562]I think overv's pastebin looks cooler :)
Server side file: (addons/serverstuff/lua/autorun/server/serverstuff.lua)
[url]http://code.overvprojects.nl/viewcode.php?id=255[/url]
Client side file: (addons/serverstuff/lua/autorun/client/menu.lua)
[url]http://code.overvprojects.nl/viewcode.php?id=256[/url][/QUOTE]
[QUOTE=Divran;16120979]Just use the chat detector I fixed. It's in the Server side file on here:[/QUOTE]
yea im actually testing that lua files that you made, and I tryed removing the code from your lua file, both ways failed.
Sorry, you need to Log In to post a reply to this thread.