Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: DannyMartinez on April 04, 2007, 07:44:43 PM

Title: The lua box.
Post by: DannyMartinez on April 04, 2007, 07:44:43 PM
I dont get. so i add thise _ = nil -- Make sure we're starting out right.
local old__newindex = _G.__newindex
setmetatable( _G, _G )
function _G.__newindex( t, k, v )
if k == "_" then
-- If you care enough to fix bad scripts uncomment this following line.
-- error( "attempt to modify global variable '_'", 2 )
return
end

if old__newindex then
old__newindex( t, k, v )
else
rawset( t, k, v )
end
end to the addons folder?But i dont get it.Do i name the folder the thing?Or do i put it in a text document?
Title: Re: The lua box.
Post by: DannyMartinez on April 04, 2007, 07:47:53 PM
Wait o i add a .lua at the end of the folder or do i add .lua at the end of the thing  like thise t_ = nil -- Make sure we're starting out right.
local old__newindex = _G.__newindex
setmetatable( _G, _G )
function _G.__newindex( t, k, v )
if k == "_" then
-- If you care enough to fix bad scripts uncomment this following line.
-- error( "attempt to modify global variable '_'", 2 )
return
end

if old__newindex then
old__newindex( t, k, v )
else
rawset( t, k, v )
end
end.lua
Title: Re: The lua box.
Post by: Megiddo on April 04, 2007, 08:16:09 PM
You put it in a file in autorun, just make sure it has .lua as the extension.
Title: Re: The lua box.
Post by: DannyMartinez on April 04, 2007, 08:53:46 PM
As a text doucement?
Title: Re: The lua box.
Post by: spbogie on April 04, 2007, 09:02:38 PM
1) Open Notepad
2) Copy the text below
Code: [Select]
_ = nil -- Make sure we're starting out right.
local old__newindex = _G.__newindex
setmetatable( _G, _G )
function _G.__newindex( t, k, v )
if k == "_" then
-- If you care enough to fix bad scripts uncomment this following line.
-- error( "attempt to modify global variable '_'", 2 )
return
end

if old__newindex then
old__newindex( t, k, v )
else
rawset( t, k, v )
end
end
3) Paste it into notepad
4) File -> Save As
5) Save to /garrysmod/lua/autorun/ as "underscorefix.lua" (With the quotes)
Title: Re: The lua box.
Post by: DannyMartinez on April 05, 2007, 07:09:26 AM
But how do I turn the box into a code?
Title: Re: The lua box.
Post by: DannyMartinez on April 05, 2007, 07:33:43 AM
And how do i put quotes? like with 2 of ' that?
Title: Re: The lua box.
Post by: DannyMartinez on April 05, 2007, 07:43:53 AM
The code like thise?
Code: [Select]
_ = nil -- Make sure we're starting out right.
local old__newindex = _G.__newindex
setmetatable( _G, _G )
function _G.__newindex( t, k, v )
if k == "_" then
-- If you care enough to fix bad scripts uncomment this following line.
-- error( "attempt to modify global variable '_'", 2 )
return
end

if old__newindex then
old__newindex( t, k, v )
else
rawset( t, k, v )
end
end
Title: Re: The lua box.
Post by: spbogie on April 05, 2007, 12:14:40 PM
Ok, I don't know how much easier I can make it.

1) Go to http://www.ulyssesmod.net (http://www.ulyssesmod.net) and copy the code.
(http://i146.photobucket.com/albums/r247/spbogie/_%20fix%20guide/copy.png)

2) Open up notepad.
(http://i146.photobucket.com/albums/r247/spbogie/_%20fix%20guide/opennotepad.png)

3) Paste the code you just coppied into notepad.
(http://i146.photobucket.com/albums/r247/spbogie/_%20fix%20guide/paste.png)

4) Save As...
(http://i146.photobucket.com/albums/r247/spbogie/_%20fix%20guide/saveas.png)

5) Navigate to "<Steam directory>/SteamApps/<account name>/garrysmod/garrysmod/lua/autorun" for listen server, or "<SRCDS dir>/garrysmod/lua/autorun" for dedicated server"
(http://i146.photobucket.com/albums/r247/spbogie/_%20fix%20guide/saveas2.png)

6) Save the file as "underscorefix.lua" (With the qotes) ( " is < Shift + ' > )
(http://i146.photobucket.com/albums/r247/spbogie/_%20fix%20guide/saveas3.png)

If you can't get it from that then I'm sorry but I can't make it any easier.
Title: Re: The lua box.
Post by: DannyMartinez on April 05, 2007, 04:31:44 PM
Thank you!
Title: Re: The lua box.
Post by: Megiddo on April 05, 2007, 04:36:08 PM
Posted on front page. Thanks spbogie!
Title: Re: The lua box.
Post by: DannyMartinez on April 05, 2007, 04:45:02 PM
IT WORKS :D TYTYYTYTYYT spbogie!
Title: Re: The lua box.
Post by: JamminR on April 05, 2007, 06:36:21 PM
SpBogie, hats off to you.
You have more patience than I've had in a while.
A long while.