Re: Re: Re: Re: Re: Re: Re: Re: Untitled

By Abrupt Motmot, 10 Years ago, written in TCL/iTCL, viewed 646 times. This paste is a reply to Re: Re: Re: Re: Re: Re: Re: Untitled by Hot Octupus
URL http://pb.stoleyour.com/view/0c767e81 Embed
Download Paste or View RawExpand paste to full width of browser
  1. # Set up color dict
  2. set serverColors {"Red" "004" "Green" "003" "Blue" "002"}
  3. # Build output string
  4. set output ""
  5. foreach world $worlds {
  6.         # Get name, score, and color for this server
  7.         set name [dict get $world "name"]
  8.         set score [dict get $world "score"]
  9.         set color [dict get $serverColors [dict get $world "color"]]
  10.        
  11.         # Append colorized server info
  12.         set output "$output\002\$color$name\$color\002: \002$score\002, "
  13. }

Reply to "Re: Re: Re: Re: Re: Re: Re: Re: Untitled"

Here you can reply to the paste above