egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

if else ?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Freakazoid
Voice


Joined: 31 Jul 2005
Posts: 11

PostPosted: Sat May 26, 2007 7:10 pm    Post subject: if else ? Reply with quote

i got one quest! i wanna use a if script request for an sql output
with an else error if entry not found in the db.
how can i make it

in php is it easy if($nick='$ds[nick]) { echo'output info'; } else { echo'error no user found' }
but how works it with tcl ?

mfg freak Smile
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat May 26, 2007 7:16 pm    Post subject: Reply with quote

"if <conditional> [then] <what todo if true> else <what todo if false>"
Checking the manpage for "if" might also be a good idea...

Most common structures would be like this:
Code:
if {sometest} {somecode} {someothercode}

if {sometest} {
 somecode
} {
 someothercode
}

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Freakazoid
Voice


Joined: 31 Jul 2005
Posts: 11

PostPosted: Sat May 26, 2007 7:18 pm    Post subject: Reply with quote

nml375 wrote:
"if <conditional> [then] <what todo if true> else <what todo if false>"
Checking the manpage for "if" might also be a good idea...

Most common structures would be like this:
Code:
if {sometest} {somecode} {someothercode}

if {sometest} {
 somecode
} {
 someothercode
}


thx nml375 Smile

one quest give it some good tutorials or links Smile ?
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sat May 26, 2007 8:10 pm    Post subject: Reply with quote

Freakazoid wrote:
one quest give it some good tutorials or links Smile ?

/man/tcl8.4/TclCmd/
How to write eggdrop scripts that won't choke on special characters
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Freakazoid
Voice


Joined: 31 Jul 2005
Posts: 11

PostPosted: Sun May 27, 2007 7:22 am    Post subject: Reply with quote

thx Smile Alchera
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber