Luapad - In-game scripting environment with syntax highlighting
156 replies, posted
Alright, can I see a list of your addons? One of them probably uses datastream... If I can look at it's code, I can probably make a workaround for it.
[QUOTE=Levybreak;17180442]Alright, can I see a list of your addons? One of them probably uses datastream... If I can look at it's code, I can probably make a workaround for it.[/QUOTE]
It was working fine before, I hadn't had a problem. I'll look through my recent addons to see if any of them are conflicting, then I'll post what I think is conflicting.
[editline]Edited:[/editline]
You won't believe what it is, I spent half an hour going through all my addons to find out what was conflicting, Wire SVN. I have no idea how but once I removed it, it worked and when I put it back, it didn't.
wire was conflicting? strange.
it does use datastream, but it doesn't mess with anything.
the hooks it uses are:
wire_expression2_filedata
wire_expression2_filewrite
wire_holograms_owners
wire_expression2_sendfunctions_hook
wire_expression2_sendfunctions_hook2
it also has 'if not datastream then require( "datastream" ) end' everywhere, so it doesn't overwrite whatever modifications you are making.
the only thing that MIGHT be conflicting is this:
FindMetaTable("CRecipientFilter").IsValid = function() return true end
[editline]08:59PM[/editline]
R4zzer: The problem is fixed in r1654. (thanks stickly man)
It was that E2 file extension I hesitated committing over a month or something :)
I've also noticed that occasionally the upload doesn't get executed on server.
I hope the above will fix it.
[QUOTE=TomyLobo;17196247]
[editline]08:59PM[/editline]
R4zzer: The problem is fixed in r1654. (thanks stickly man)
It was that E2 file extension I hesitated committing over a month or something :)[/QUOTE]
Ok thanks for that, I'll update wire and check it now.
[QUOTE=TomyLobo;17196247]
R4zzer: The problem is fixed in r1654. (thanks stickly man)
It was that E2 file extension I hesitated committing over a month or something :)[/QUOTE]
Thanks.
Just came by to download, thought I may suggest the ever-omnicent SVN for this, seeing as how it gets update quite offten. Then there's also the fact that I'm quite the lazy man.
Very nice. Very Useful. Thanks.
Just thought I should say something.
ok i got gm_rawio where do i add it?
also can i edit say a item in a gamemode and make it refresh the code without restarting game?
[QUOTE=bradmcco;17225597]ok i got gm_rawio where do i add it?[/QUOTE]
garrysmod/garrysmod/lua/includes/modules
autorun/luapad.lua:282: attempt to index field 'Statusbar' (a nil value)
happens at regular intervals without ever using luapad or even having it installed.
the server had it though, apparently
[QUOTE=TomyLobo;17231057]autorun/luapad.lua:282: attempt to index field 'Statusbar' (a nil value)
happens at regular intervals without ever using luapad or even having it installed.
the server had it though, apparently[/QUOTE]
-snip- I'll just guess it's server.
[editline]04:22PM[/editline]
I was about to create an SVN with the logical name, Luapd, on google code, but then it said it was "In-Use" so I went to see what it was, and son of a gun: [url]http://code.google.com/p/luapad/[/url]
No idea who it is. But it IS this. Seems like whoever make it, jusing by their google code profile page, has aknack for remaking/redoing other people's projects. :P
Regardless, I'm going to set up a SVN so I don't end up releasing unstable/unnessisary versions. Ideally, I'll try to re-upload to garrysmod.org every 5 commits (unless they're all just fixes of shit I broke in the last commits.)
The SVN adress is: [url]http://lua-pad.googlecode.com/svn/trunk/[/url]
It has a prospective fix for the error above.
Oh nice a svn is used now. :D
[QUOTE=Levybreak;17231401]I was about to create an SVN with the logical name, Luapd, on google code, but then it said it was "In-Use" so I went to see what it was, and son of a gun: [url]http://code.google.com/p/luapad/[/url]
No idea who it is. But it IS this. Seems like whoever make it, jusing by their google code profile page, has aknack for remaking/redoing other people's projects. :P [/QUOTE]
By copying their code? that's an old version of LuaPad. I went and had a look at the source.
can you reopen a item in a gamemode without restarting game/server?
also how do you open it ingame?
[url=http://code.google.com/p/luapad/]This svn[/url] is owned by DarkSunrise. He just never used it.
Yeah, I stopped using it because of the problems I had in uploading. I scheduled it for deletion, and you should be able to use the name when it gets deleted.
[B]E:[/B] To fix files in the gamemodes-folder being empty:
Add this:
[lua]folder.Label:GetValue() != "garrysmod\\gamemodes" &&[/lua]
Right after (should be around line 492):
[lua]folder.Label:GetValue() != "garrysmod\\lua" &&[/lua]
So the statement would look like this:
[lua] if(folder.Label:GetValue() != "garrysmod\\data" &&
folder.Label:GetValue() != "garrysmod\\lua" &&
folder.Label:GetValue() != "garrysmod\\gamemodes" &&
folder.Label:GetValue() != "garrysmod\\addons") then -- TODO: luapad.CreateFolder() function for this[/lua]
[B]E2:[/B] Ugh.
Why is there stuff like:
[lua]if (CLIENT) then[/lua]
in the script? Everything except the lines 51 - 166 are being run on the client. I'm returning at line 165, so the server stops reading the file at that point.
how do you open this thing
[QUOTE=bradmcco;17256827]how do you open this thing[/QUOTE]
Open Console, "luapad" (without quotes)
Additionally you could bind it to a key or something.
I would commit DarkSunrise's fix....but google code seems to be down.
Fixed my issue with SVN. (Updating it apparently fucked up my firewall settings for it)
So I committed DarKSunrise's fix.
[editline]05:42PM[/editline]
Whoa, fp got tried of waiting for my reply so didn't automerge.
can u edit a code like a item and reload the code? without starting gmod aggain
[QUOTE=bradmcco;17277676]can u edit a code like a item and reload the code? without starting gmod aggain[/QUOTE]
You mean a script to reload ents/sweps/effects? I could, but I'd have to ask LuaPineapple first, since I've been using a modified version of his fast reload system myself.
[QUOTE=bradmcco;17277676]can u edit a code like a item and reload the code? without starting gmod aggain[/QUOTE]
This: [url]http://www.facepunch.com/showthread.php?p=17270809[/url]
Might be something for you.
yes, for entities you use lua_reloadent (which is what game_lv linked)
for autorun scripts you use lua_openscript(_cl)
Suggestions:
- Wouldn't mind if disconnecting from the server caused autobackup (not necessarily a save).
- Executing on a specific client wouldn't be bad either.
- I also have the urge to occasionally resize the editor.
- [?] could have added shortcut key info.
- Cvar to disable autogenerating new server side functions? (On the other hand it doesn't take too much time to just remove the generator code)
Bugreports:
I also noticed that occasionally your code is not ran when you send it to the server. I don't know whether this is a common bug or a bug in other modules that use datastream.
And right now ULX/ULib began using datastream too and for some odd reason I get stuff like this:
--snip-- Found the cause, a bad module using datastream quite an evil way.
He removed the resize code? Are you sure?
E2 editor has a resize feature and he said he based on that.
Does the E2 editor resize for you?
[QUOTE=Python1320;17479339]Suggestions:
- Wouldn't mind if disconnecting from the server caused autobackup (not necessarily a save).
- Executing on a specific client wouldn't be bad either.
- I also have the urge to occasionally resize the editor.
- [?] could have added shortcut key info.
- Cvar to disable autogenerating new server side functions? (On the other hand it doesn't take too much time to just remove the generator code)
Bugreports:
I also noticed that occasionally your code is not ran when you send it to the server. I don't know whether this is a common bug or a bug in other modules that use datastream.
And right now ULX/ULib began using datastream too and for some odd reason I get stuff like this:
--snip-- Found the cause, a bad module using datastream quite an evil way.[/QUOTE]
Eh, The disconnect hook isn't clientside, and even on the server it isn't called if you say... crash.
A periodic auto-backup idea is a good idea, though.
Yea, I should probably fill out a readme with the keyboard shortcut information.
It can/can't re-size? I've never tried, actually.
Eh, why don't you want it to auto regenerate the function list? It's just for syntax highlighting. Is it really that much of a consuming process? I've never actually noticed it.
As for the bug with the code not being run on the server... I think I discovered that while testing it myself... I think I tinkered for awhile trying to figure out what caused it, but never did. :S
Use the shutdown hook, it is called when lua is about to be shut down.
And no it can't resize, E2 can. TomyLobo said you probably forked your own copy of the E2 editor before it had resize functions. It also lacks search (and replace)
And I don't want to regenerate it because it does seem to significantly slow down my server's startup and is more or less useless.
Rebuild on demand would be better as I see no reason to rebuild the cache every time if we aren't developing something and things change for example. This also forces the clients to download new txt file each time.
All the basic important things required are put to the txt file after the first startup.
Myself, I rebuild the cache only when I add something that I want to "touch".
instead of a disconnect hook, use EntityRemoved and check IsPlayer
Sorry, you need to Log In to post a reply to this thread.