Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
jroper73
Novice


Joined: 03 Aug 2006
Posts: 30

PostPosted: Thu Aug 10, 2006 8:52 pm   

Checking if a session is active
 
How would you check to see if a session is online, or not, from another session.

I tried something like this, and it did not work
Code:

#if (!@MyHealerSesName) {
   say EEK - lost my healer
}
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Aug 16, 2006 12:57 am   
 
Check the session's %ctime twice and see if it changes?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Aug 16, 2006 1:50 am   
 
I think you'll have to store %ctime for it to be visible to other sessions:

#if (@Session2.ctime != @session2.ctimeold) {#say Session2 is connected!} {#say Session2 is offline!}
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net