ID:161415
 
At the moment the time2text() proc would say something like;
Fri May 09 17:19:59 2008.

How would I go around making the time2text() proc only show:
- Hour and minute, AM/PM
- Day, month, and year (Example: 09 May 2008)
- Day, month, year, Hour, Minute, AM/PM

Example:
- (Hour:Minute AM/PM) Howey says: bla
- Howey has logged in. (09 May 2008)(Hour:Minute AM/PM)
- Howey has logged out. (10 May 2008)(Hour:Minute AM/PM)

The actual times will need to be in GMT format, which I think is default as GMT timezone.
Howey wrote:
How would I go around making the time2text() proc only show:

Look up the parameters to time2text(), it is the second format you want.

- Hour and minute, AM/PM

"hh:mm" will give you "12:30" type of time format.

- Day, month, and year (Example: 09 May 2008)

"DD MMM YYYY"
In response to Loduwijk
Loduwijk wrote:
Howey wrote:
How would I go around making the time2text() proc only show:

Look up the parameters to time2text(), it is the second format you want.

- Hour and minute, AM/PM

"hh:mm" will give you "12:30" type of time format.

- Day, month, and year (Example: 09 May 2008)

"DD MMM YYYY"


Yea, but where do I put them?
mob/verb
say(msg as text)
set hidden = 1
if(!disabled)
if(!muted)
if(!chatdoing)
chatdoing = 1
world << "<b>>[time2text(hh:mm)]<</b> [usr]: [msg]"
sleep(8)
chatdoing = 0

I tried doing it like that and got:
verbs.dm:32:error:hh/:/mm:undefined var
In response to Howey
Howey wrote:
I tried doing it like that and got:
verbs.dm:32:error:hh/:/mm:undefined var

Sorry but, of course it wouldn't work like that; look the time2text() proc up again and see what the reference says about that 2nd argument, what should it be.
You might have not made this error if you haven't called the proc in an embedded expression, because there is no syntax highlighting there (although the indicative here is the lack of highlighting), so that might have caused you to make a syntax error. So perhaps you'll want to try it outside the embedded expression first.
var/value = whatever_proc(x,y,z,10)
src << "embedded value is [value]" //etc
In response to Howey
world << "<b>>[time2text(world.realtime,"hh:mm")]<</b> [usr]: [msg]"

you have to give it a time source as the first arguement, and put the 2nd one in quotation marks