This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Announce: Tarot script

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Announce: Tarot script

Post by rosc2112 »

A New, original script by yours trully :)

Code: Select all

###################################################################
# Tarot.tcl by Rosc (copyright C.Leonhardt 2006) rosc2112 at yahoo com
# http://members.dandy.net/~fbn/tarot.tcl.txt
#
# The *first* eggdrop tcl tarot script, well, at least the first I've seen ;)
# I whipped this up in about an hour, most of which was writing the card descriptions.
#
# Commands: 
# .tarot 1   or   .tarot single     for a 1-card spread
# .tarot 3   or   .tarot            for a 3-card spread 
# .tarot help                       brief helpfile
#
# History:
#          June 10 2006 - Initial creation.
###################################################################
Will upload to the archive as well.
c
chelle21
Voice
Posts: 3
Joined: Fri Sep 29, 2006 7:35 am

Post by chelle21 »

Tcl error [tarot]: bad format string "%s"
it appears when i try to do the tarot reading
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

You will help the author when posting the full error from errorInfo and your TCL version. If the error occurs within a format or scan it should be not bad for anything 8.x at least.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
c
chelle21
Voice
Posts: 3
Joined: Fri Sep 29, 2006 7:35 am

Post by chelle21 »

Edited: You were asked to post the results of '.set errorInfo' not post something that is already known (the script) - Alchera
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

chelle21 wrote:Tcl error [tarot]: bad format string "%s"
it appears when i try to do the tarot reading
I have the script, I don't need to see another copy of it. I need to see the output of .set errorInfo and I need to know what version of eggdrop and tcl you're using.

The script works fine for me, so if there is an error with the "format" command, I'd suspect it's your version of eggdrop and/or tcl.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

I just looked over the TCL man pages and it seems %s for clock came with TCL 8.4, so you are encuraged to upgrade. If not possible just remove the clock format and just make [unixtime] the seed for the "randomness".
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Thanks De Kus, I didn't realize the clock format command was only in the newer tcl's, so I made the following minor change to the script:

Code: Select all

       # newer tcl's can use the clock format command. 
        #set tarotseed [clock format [clock seconds] -format "%s"]
        set tarotseed [unixtime]
I'll upload the fix as well to the url posted above for the script.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

clock format is older, but the format string %s is kind of new... well tcl 8.4 isnt actually really new :D.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
c
chelle21
Voice
Posts: 3
Joined: Fri Sep 29, 2006 7:35 am

Post by chelle21 »

that worked. thank u guys. :) sorry for being a newbie ;)
e
elamont
Voice
Posts: 1
Joined: Tue Feb 20, 2007 2:49 pm

Post by elamont »

Thanks so much for asking that question. I was wondering the same thing.
Erin

EDIT: removed spam links - user
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

not sure if you know, but [clock format [clock seconds] -format %s] is infact the exact same as [clock seconds] :roll:
Post Reply