my guide to dynamic variables
 
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Tutorials
 
Aaron  -  Wed Feb 14, 2007 10:13 am Reply with quote
im bored so im gonna show you how to use a dynamic var Surprised

starting with a simple quote of the day variable.
Code
 


pretty simple, but what if you didnt want that quote to leave the channel?

Thats where you need to use a dynamic var

Code
 


it will appear in the variables tab as...
Code
 


*note that you can also do this another way, but id rather use [ and ]

now the quote you entered will only be in that single channel.

NOW lets move onto, personal greets...youll definatly need a dynamic to work this script.

Code
 


PLAYING VAR'S

as simple as undynamics, this is an example from the setgreet earlier.
Code
 


pretty simple eh Smile

DURATION/TIME

time, very simply made..duration not so fun

for time...
Code
 

for duration...
Code
 


time, no different than playing the variable.
Code
 


however, duration...much longer.
Code
 


*note that...
Code
 

WILL NOT work

Hope that youve learved something from this Smile
jaytea  -  Fri Mar 09, 2007 3:41 pm Reply with quote

Aaron wrote


*note that...
Code:
$duration($calc($ctime - %time. [ $+ [ $chan ] ]))

WILL NOT work


within $calc the evaluation brackets need to be spaced on both sides:

Code
 


which solves the problem Razz $calc() seems to be one of the only identifiers with this limitation
QuickStep  -  Fri Apr 13, 2007 7:08 pm Reply with quote
Note that the square parenthesis have nothing to do with dynamic variables, they just denote the order in which mirc should evaluate your code.

e.g.:

- %var $+ $nick will not work, because mirc will evaluate %var first.
- %var $+ [ $nick ] will not work, because in this case mirc will evaluate $nick first, but after that it will simply evaluate %var and append $nick to the end of it.
- %var [ $+ [ $nick ] ] WILL work, because it will evaluate the $+ before the %var, so the contents of the identifier $nick is actually appended to the variable name, in stead of the variable value.

The reason the extra spacing is required is because there is some major ambiguity going on in mirc. Basically mirc doesn't know what to do with the [], because it can either (1) throw them away (misformed calc statement) or (2) interpret them as an evaluation order. In the case there is on spacing, case 1 applies, otherwise case 2.
F R E E Z E  -  Sat Jul 21, 2007 5:50 am Reply with quote
Pretty simple but some people may learn quite a bit from this Tutorial. Being able to use dynamic variables comes in handy.

Good Job! Very Happy
Display posts from previous:   
Post new topic   Reply to topic    Hawkee.com Forum Index -> mIRC Tutorials All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.