Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Padding characters in format() (https://forums.graalonline.com/forums/showthread.php?t=69053)

Dach 09-29-2006 09:14 PM

Padding characters in format()
 
It seems that format() has stopped reading the padding characters properly. Normally, something like this:
NPC Code:
format("okay, the date is %02d:%02d",this.hours,this.minutes);


would have an output along the lines of:
okay, the date is 12:02

Now, it outputs:
okay, the date is 12: 2

I noticed this in a server npc that outputs the date to RC, I would test for weapon and level npc outputs, but I don't have the Graal client installed here.

xAndrewx 09-29-2006 10:06 PM

Weird...
(this.minutes.length() != 2? "0" @ this.minutes: this.minutes)?
Use that?

Admins 09-30-2006 01:58 AM

I will need to check that. The format options are not supporting everything from printf, it is mainly coverting everything required for the mudlib, but more options can be added.


All times are GMT +2. The time now is 10:31 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.