General > Developers Corner

Lua n00b questions

<< < (6/10) > >>

krooks:
I've found some lua tutorial videos on youtube that have helped me a lot, and I wrote my first complete script without copy/pasting code bits from other people's work! I still have questions for ya Meg, so you're not out of the woods just yet  ;)

On a side note, I am currently running a dev ttt server off the same gmod installation that my public sandbox server is on, I just point it to a different server.cfg script. This works fine, but I'm getting conflicts with plugins not built for TTT. How do I go about making the plugins SB only?

Currently, I've edited the init.lua with this line:
if SERVER and (gmod.GetGamemode().Name == "Sandbox") then
It seems to work ok, but is there an easier way? Could I maybe add something to addon.txt??

JamminR:
If you mean 'info.txt', no.
In fact, it seems Garry seems to be moving away from it (Garry's Steam Workshop doesn't even require the file)
Though Meg/Stickly may suggest a better way, I'm pretty sure the way you're doing it is good, if not a pain to edit any addon you get.

krooks:
info.txt actually changed to addon.txt, but it's the same thing I believe -- more things Garry changed seemingly just to make things hard :P

It's so hard learning glua right now, there's all this mixed info all over the place after GM13  :-[

Megiddo:

--- Quote from: krooks on January 16, 2013, 03:14:29 PM ---more things Garry changed seemingly just to make things hard :P

--- End quote ---

He changed it so old addons would be incompatible. But, he already does this each update by changing the API anyways...

JamminR:

--- Quote from: Megiddo on January 16, 2013, 03:47:17 PM ---He changed it so old addons would be incompatible. But, he already does this each update by changing the API anyways...

--- End quote ---
LOL.
Indeed.
And, I was confused. I could have sworn the file name changed from what krooks originally said to what I said.
Guess I was backwards. Not unusual.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version