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.

Another simple msg script

Old posts that have not been replied to for several years.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

Na... I just like to declare a global variable
always do, when there is no global variable declared.

Seems useless, but gives the right majestic touch
to the procedure when you look at it.
lol @ that if its not needed then its not needed that simple its useless using unused code will only slow down the script and in the end if everyone starts codeing like that the whole bot :p, also a script is about functionality not how it looks lol just a pointer .. (well abit is so its more readable to other scripters but adding useless code will only make other scripters confused or make the script to messy)
"Hey it works... so no need to change it"
lol ill keep it in mind next time u give comment on some script hehe witch u did :p allready .. (don't take it wrong just wanted to point that out :p)
XplaiN but think of me as stupid
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

Ofloo wrote:
"Hey it works... so no need to change it"
lol ill keep it in mind next time u give comment on some script hehe witch u did :p allready .. (don't take it wrong just wanted to point that out :p)
Huh? What're you trying to say?
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

No need to start a flame.. chil out!
Once the game is over, the king and the pawn go back in the same box.
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

Alchera wrote:Ok, I'm lazy. I can't be bothered typing "global blah blah" all the time. LOL :lol:
well, that was my point ;)
instead of typing "$::botnick" 20 times, i type once "global botnick" and save me 2 chars every time i use the var 8)
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

The only benefit of using :: is if you only use a variable once or twice...
If you use multiple times over and over (ie. if it's inside a loop or something), its overhead will become larger than with the global equivelant.

Furthur more, Not all Tcl versions support namespaces, (Tcl7.6p2 for example), so global is the only method to use to retain compatibility.
Locked