Difference between revisions of "DollarPlus"

From Scriptwiki
Jump to: navigation, search
m (The term is concatenate)
m (New example, changed 'variable' to 'variable or identifier')
Line 10: Line 10:
 
  $+(here,we,have,some,te $+ xt)  ;returns ''herewehavesometext''
 
  $+(here,we,have,some,te $+ xt)  ;returns ''herewehavesometext''
  
When used that way, the identifier doesn't look too useful. But when we have a variable as an item, it's necessary to use either of these $+.
+
When used that way, the identifier doesn't look too useful. But when we have a variable or identifier as an item, it's necessary to use either of these $+.
  
 
  [[msg]] [[$chan]] You are [[$nick]] ( $+ [[$fulladdress]] $+ ) could return ''You are Dana (Dana!dana@script.quakenet.org)''
 
  [[msg]] [[$chan]] You are [[$nick]] ( $+ [[$fulladdress]] $+ ) could return ''You are Dana (Dana!dana@script.quakenet.org)''
 +
[[msg]] [[$chan]] You are very smart $+([[$nick]],;) welcome to [[$chan]] $+ . could return ''You are very smart Dana; welcome to #brainiacs.''
  
 +
Notice how if we had used $chan. or $nick; mIRC would look for identifiers with these names and return nothing.
  
 
[[Category:Other Identifiers]]
 
[[Category:Other Identifiers]]

Revision as of 16:36, 5 April 2009

Note: the name of this page refers to identifier $+ but is as it is due to technical limitations

The identifier $+ is used to combine (concatenate) items together when it's impossible just to write them together due to variables or identifiers.

$+ OR $+(...)

The identifier $+ can be used two different ways. One way is just as $+ between items and another one is by passing arguments such as $+(item1, item2, ..., itemN)

here we have so $+ me text  ;returns here we have some text
$+(here,we,have,some,te $+ xt)  ;returns herewehavesometext

When used that way, the identifier doesn't look too useful. But when we have a variable or identifier as an item, it's necessary to use either of these $+.

msg $chan You are $nick ( $+ $fulladdress $+ ) could return You are Dana (Dana!dana@script.quakenet.org)
msg $chan You are very smart $+($nick,;) welcome to $chan $+ . could return You are very smart Dana; welcome to #brainiacs.

Notice how if we had used $chan. or $nick; mIRC would look for identifiers with these names and return nothing.