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.
Old posts that have not been replied to for several years.
-
Darkj
- Halfop
- Posts: 86
- Joined: Sun Jul 06, 2003 9:58 pm
Post
by Darkj »
Ok, this will probably be like flame central, but I actually would like to know the differences when using the lindex command
set text [lindex $arg 0]
-Thats the bad way, how is it bad, will it crash the bot on special characters etc?
set text [lindex [split $arg] 0]
-Now this will display special characters? If so, what characters are only shown with this version?
Probably some easier questions, but I just wanna figure this stuff out.
-
Dedan
- Master
- Posts: 260
- Joined: Wed Jul 09, 2003 10:50 pm
- Location: Memphis
Post
by Dedan »
lindex is a "list" command.
the string needs to be changed from a string to a list.
the "split" command accomplishes this.

I once was an intelligent young man, now i am old and i can not remember who i was.
-
BarkerJr
- Op
- Posts: 104
- Joined: Sun Mar 30, 2003 1:25 am
-
Contact:
Post
by BarkerJr »
Darkj wrote:set text [lindex $arg 0]
-Thats the bad way, how is it bad, will it crash the bot on special characters etc?
If $arg is "[die]", tho bot will die when you lindex it. Split protects that by making it a list, as Dedan stated.
-
Souperman
- Halfop
- Posts: 69
- Joined: Sat Feb 02, 2002 8:00 pm
- Location: Cape Town, South Africa
-
Contact:
Post
by Souperman »
If you're having trouble with using list commands on strings, I suggest you read
http://www.peterre.com/characters.html.
Quick! Somebody get me a new ink cartridge