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 … 13 14 15 16 17 18 Next »
Starfall Help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pages (5): « Previous 1 2 3 4 5
Threaded Mode
Starfall Help
16-06-2015, 04:54 PM, (This post was last modified: 16-06-2015, 04:57 PM by SuperPlayer.)
#41
SuperPlayer Offline
TSCM Super Member
****
Posts: 234
Threads: 30
Joined: Oct 2014
RE: Starfall Help
If i am not mistaken you are confused by the colors the print commands have. The color of someething you print is not defined by the enviorment you print it in(as far as i know). Also all this seems just fine for me. Maybe you can explain more clear what your problem is?
Also I am not sure if there is a Shared envioment in SF. I think there is just Server and Client
Find
Reply
16-06-2015, 05:28 PM, (This post was last modified: 16-06-2015, 05:29 PM by shinji144.)
#42
shinji144 Offline
TSCM Member
***
Posts: 5
Threads: 2
Joined: Jun 2015
RE: Starfall Help
(16-06-2015, 04:54 PM)SuperPlayer Wrote: If i am not mistaken you are confused by the colors the print commands have. The color of someething you print is not defined by the enviorment you print it in(as far as i know). Also all this seems just fine for me. Maybe you can explain more clear what your problem is?
Also I am not sure if there is a Shared envioment in SF. I think there is just Server and Client

SF does have shared, that is the area after the directives and before the "if SERVER then". In gmod's lua, printing on client is yellow, whereas printing on server is blue. My question/problem is why does each print() print twice, once on server and client for both client and server environments- and why does the shared environment print twice.

As Divran mentioned to me, all my fuss is probably debug print. However, why does shared print twice (two sets of ones)
as shown [Image: OkusgyM.png]
Website Find
Reply
16-06-2015, 05:53 PM,
#43
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Starfall Help
It prints "1" twice because the server runs, prints it, then a while later, your client receives the code and then runs the print again on the client. Client and server do not run at the same time at startup (or ever really). Bear in mind that the "shared" environment still exists in 2 places, it's not really an environment so much as you're just happy to have code run on both sides.

The reason for the double coloured print, is that the "print" is actually GLua's PlayerTonguerintMessage( HUD_PRINTTALK, Message ). The blue is the chat being replicated to the console, the yellow is PrintMessage replicating its output to the console. I don't really see the point in making a special snowflake print function just to avoid that. If you really want a useful print, just use printConsole instead and avoid the chat version.

I was tempted to change print to be console based and deprecate printConsole, but people are pretty used to chat-based printing. Not sure if it would go down well.
Find
Reply
16-06-2015, 06:01 PM, (This post was last modified: 16-06-2015, 06:04 PM by shinji144.)
#44
shinji144 Offline
TSCM Member
***
Posts: 5
Threads: 2
Joined: Jun 2015
RE: Starfall Help
Thanks for the thorough explanation, that cleared up everything.

(16-06-2015, 05:53 PM)Person8880 Wrote: I don't really see the point in making a special snowflake print function just to avoid that. If you really want a useful print, just use printConsole instead and avoid the chat version.

Fair enough. I'd actually forgotten about the printConsole command- I'll use that from now on.

(16-06-2015, 05:53 PM)Person8880 Wrote: I was tempted to change print to be console based and deprecate printConsole, but people are pretty used to chat-based printing. Not sure if it would go down well.

Haha, probably not :p
Website Find
Reply
« Next Oldest | Next Newest »
Pages (5): « Previous 1 2 3 4 5


  • View a Printable Version
Forum Jump:


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

Powered By MyBB, © 2002-2026 MyBB Group.