Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 6 7 8 9 10 … 18 Next »
Global Functions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Global Functions
11-08-2017, 04:32 PM,
#9
Kosmos Offline
GMod Admin
Posts: 180
Threads: 3
Joined: Dec 2013
RE: Global Functions
I think making _G unmodifiable does more harm than good, especially given that you can deny certain people access to your scripts using access privileges.
Not to mention that there were numerous ways to detect when the environment has been modified in a non-subtle way.

EDIT: I'd say making a function isMainFile() which resides in the global namespace would be more practical to use. Or even worse, make it a pre-processor directive.
EDIT2: Actually, the latter might be a nice extension to the @class directive, after the type you can specify that this file must be the main file.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Global Functions - by Red The Blue Color - 10-08-2017, 09:59 PM
RE: Global Functions - by Obi - 10-08-2017, 10:02 PM
RE: Global Functions - by Skeleton - 10-08-2017, 10:08 PM
RE: Global Functions - by Salira - 10-08-2017, 10:08 PM
RE: Global Functions - by 4N0NYM - 10-08-2017, 10:08 PM
RE: Global Functions - by TheOneAndOnlyTee - 10-08-2017, 10:15 PM
RE: Global Functions - by Red The Blue Color - 10-08-2017, 10:17 PM
RE: Global Functions - by Skeleton - 10-08-2017, 10:24 PM
RE: Global Functions - by Kosmos - 11-08-2017, 04:32 PM
RE: Global Functions - by Person8880 - 11-08-2017, 05:45 PM
RE: Global Functions - by Red The Blue Color - 11-08-2017, 06:50 PM
RE: Global Functions - by Skeleton - 11-08-2017, 06:45 PM
RE: Global Functions - by Kosmos - 11-08-2017, 07:08 PM
RE: Global Functions - by Person8880 - 11-08-2017, 07:12 PM
RE: Global Functions - by Red The Blue Color - 11-08-2017, 08:27 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.