• Now, Lua's autorun isn't autorunning. >:(
    3 replies, posted
I'm starting to get pissed with all these errors, i seriously don't give a shit if it's my code or not, i just want it to work. [lua] local button1 = vgui.Create("DButton") button1:SetPos(50,25) button1:SetSize(100,50) button1:SetText("Kill Yourself!") button1:MakePopup() button1.DoClick = function() RunConsoleCommand("kill") end [/lua] can there be a simpler fucking derma code!? but i put it in the autorun folder, guess what? theres no fucking button in the left hand corner of the fucking screen i have restarted everything. i'm starting to thing it's not my code.... [highlight](User was banned for this post ("Wrong section" - mahalis))[/highlight]
It would be nice if you could post errors, and I can see from the code that line eight is misspelled and should be "end". Why is there an end at the end of that code anyway? There's no function. Edit: What the hell. You already made another thread six hours ago about the same thing [url]http://www.facepunch.com/showthread.php?t=893907[/url]. Learn to be patient. You're getting angry when the error is your own damn code.
[QUOTE=warbasher;20184429]It would be nice if you could post errors, and I can see from the code that line eight is misspelled and should be "end". Why is there an end at the end of that code anyway? There's no function. Edit: What the hell. You already made another thread six hours ago about the same thing [url]http://www.facepunch.com/showthread.php?t=893907[/url]. Learn to be patient. You're getting angry when the error is your own damn code.[/QUOTE] Looking at his code there are two or more errors: 1.) Your function "end" is spelled wrong 2.) You are probably putting that exact code into a clientside autorun which is not run at the correct time. Wrap it in a function that is hooked to Initialize.
Make sure that it is in the client folder. @ warbasher - There is a function after button1.DoClick.
Sorry, you need to Log In to post a reply to this thread.