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.
-
metroid
- Owner
- Posts: 771
- Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid »
I'm kind of confused as i thought this should be able to work, but obviously, it doesnt
Code: Select all
chattr $vhandle +[changelev:convert $arguments]
proc changelev:convert { arguments } {
if {[string match -nocase $arguments "staff"]} {
return "o"
} elseif {[string match -nocase $arguments "operator"]} {
return "m"
} elseif {[string match -nocase $arguments "developer"]} {
return "n"
} elseif {[string match -nocase $arguments "admin"]} {
return "n"
} else {
return ""
}
}
Shouldn't this work?
-
demond
- Revered One
- Posts: 3073
- Joined: Sat Jun 12, 2004 9:58 am
- Location: San Francisco, CA
-
Contact:
Post
by demond »
you got arguments of [string match] reversed; the pattern must be first, the string you check against the pattern second
-
greenbear
- Owner
- Posts: 733
- Joined: Mon Sep 24, 2001 8:00 pm
- Location: Norway
Post
by greenbear »
and a switch would work better too
-
metroid
- Owner
- Posts: 771
- Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid »
"d'oh"
I'll give it a try, i didnt notice i put it backwards
