[QUOTE=Nevec]It's not broken. It works fine for me.[/QUOTE]
Why did someone say it was broken?
EDIT: There me being an idiot - not reading all of the topic.
EDIT2: Anyhow I will test it in a minute...
I got it working, just didn't read his instructions was all.
Please don't write .NET modules because it excludes non-windows users from using them and it might give garry ideas.
[QUOTE=philxyz]Please don't write .NET modules because it excludes non-windows users from using them and it might give garry ideas.[/QUOTE]
Two things:
1) You can't run gmod in linux.
2) .NET works fine in linux.
1) Wrong. It does run in linux, I play it in Slackware under wine, thanks.
2) I don't know that anyone has got Mono working with wine in that way.
Can you re upload the files?
[QUOTE=high]Can you re upload the files?[/QUOTE]
[url]http://upload.xer0.info/uploads/mg4ck/gmodnet.rar[/url]
Source too?
Don't have it, sorry.
[QUOTE=philxyz]1) Wrong. It does run in linux, I play it in Slackware under wine, thanks.
2) I don't know that anyone has got Mono working with wine in that way.[/QUOTE]
1) That's not running natively in linux.
2) It works fine, just like most other pieces of software it runs in wine.
[QUOTE=8LaNK]1) That's not running natively in linux.
2) It works fine, just like most other pieces of software it runs in wine.[/QUOTE]
I know what I'm talking about, I wrote a small part of it.
Wine may even support .NET nowadays... but why rely on that when the underlying code fully clean-room microsoft-free?
[QUOTE=philxyz]I know what I'm talking about, I wrote a small part of it.
Wine may even support .NET nowadays... but why rely on that when the underlying code fully clean-room microsoft-free?[/QUOTE]
Well for one gmod is not really microsoft free at all.
Secondly, use the tools that are best for the job, not the ones which you believe are better because they're not made by the evil overlord microsoft.
Thirdly, why rely on the slow buggy wine when you can run your source apps natively on windows?
And once again, mono is perfectly capable. I use it every day. Both within and externally to wine.
Well, I kind of feel I'm wasting my time arguing now. I used to argue about Windows vs Linux back when I was 15. I'm 23 now and windows is so insignificant that I really don't care what people use any more. Linux and BSD work great (and having not had Windows on any of my PCs for 8 years now, I really, really don't miss it one bit.)
(wine works well enough that I don't have to bother with wasting my time with windows)
(Lets all talk in brackets guys!)
[QUOTE=philxyz]Well, I kind of feel I'm wasting my time arguing now. I used to argue about Windows vs Linux back when I was 15. I'm 23 now and windows is so insignificant that I really don't care what people use any more. Linux and BSD work great (and having not had Windows on any of my PCs for 8 years now, I really, really don't miss it one bit.)
(wine works well enough that I don't have to bother with wasting my time with windows)[/QUOTE]
Seriously, you must have missed something since I've already said I use linux pretty much every day.
The point is that complaining about something not being cross platform when you're working on a game which isn't is totally flawed. Not to mention it is cross platform, the main reason believe it or not for running code in a VM ( read: .NET ) is cross platform interoperability.
8LaNK, I wasn't really concentrating which resulted in my posting of a response which appeared as if I assumed you were a Windows user. Well, from what you said, I know you use both but I just feel the argument isn't going anywhere or even really an argument at all.
My original post in this thread was simply a request that people not become to enamoured with the idea of using .NET with gmod so that we don't end up in a situation where you and / or I end up having to install mono and mess around with all that just to get the game to start when for most things, Lua is more than fine and certainly fast enough to compete with the .NET virtual machine.
I realise that .NET opens up the possibility of bringing in external code not otherwise possible via Lua, but the moment garry starts writing large swathes of gmod in C#, I'm going to have to mess around with Mono to get the game to even start and it would be nice to avoid that situation.
Is there any way to force GMod to unload the DLLs so you can compile and reload them?
No, you need to restart the game. Like all modules as far as I know.
Edit: Proved wrong by AzuiSleet, you just need to disconnect / load the map again.
Sorry for the minor bump but: Is there a way to get a given tables length? Technically I could pass the lenght as an arg to the function but is there a way to get around that?
[code]Lua.GetAllTableMembers(stackpos).Length[/code]
Counter question: How do I receive and call a function in args?
Try tinkering with Lua.Call. Though, I have no idea what it does. You can get the function with Lua.GetObject or Lua.GetManagedObject.
One function returned IntPtr. You may somehow use that to call the function.
I hope some of that helped.
[QUOTE=Nevec]Try tinkering with Lua.Call. Though, I have no idea what it does. You can get the function with Lua.GetObject or Lua.GetManagedObject.
One function returned IntPtr. You may somehow use that to call the function.
I hope some of that helped.[/QUOTE]
Lua.Call is two ints, Lua.GetObject has isFunction, but no way to call. Lua.GetMangagedObject is to get a .net class (Example: Jinto's xml thing in the OP)
[QUOTE=ShaRose]Lua.Call is two ints, Lua.GetObject has isFunction, but no way to call. Lua.GetMangagedObject is to get a .net class (Example: Jinto's xml thing in the OP)[/QUOTE]
Didn't you listen on IRC yesterday?
Push the function(Lua.Push) then call it. Push arguments before you call it to pass them to it(I think), and specify the amount of arguments in Lua.Call, put 1 for returns.
I can't test this as no matter what I do now, no .NET modules will load. But this is how it works normally I think.
[QUOTE=Xera]Didn't you listen on IRC yesterday?
Push the function(Lua.Push) then call it. Push arguments before you call it to pass them to it(I think), and specify the amount of arguments in Lua.Call, put 1 for returns.
I can't test this as no matter what I do now, no .NET modules will load. But this is how it works normally I think.[/QUOTE]
I posted that before I asked on IRC. And yes, that worked. And be sure to use Lua.Pop after you are done.
[QUOTE=Robbis_1]This works great so far! But I have a question... Why does the Lua.PushLong take integers? Shouldn't it be a long?[/QUOTE]
Long is the same thing as 64-bit Integer.
[QUOTE=newton21989]Long is the same thing as 64-bit Integer.[/QUOTE]
Yes, but the integers in .NET are 32-bit.
Never mind, I'm dumb. Ignore me.
Sorry for the uber-bump, but does anyone still have this? All the dl links on this thread are dead.
[QUOTE=yakahughes;16157928]Sorry for the uber-bump, but does anyone still have this? All the dl links on this thread are dead.[/QUOTE]
It probably died in the updates
Sorry, you need to Log In to post a reply to this thread.