ProIcons commented on a Page, Unset and Replace Something (Variables)  -  Nov 30, 2009

i mean that the one variable take the others.. if you want, it is an extra snippet. there is not for everyone.. who ever wants... Lets Say tha you have 3 servers and you want to unset the 2 server, and you have a loop to read all the servers, you can use /rps 2 server so the server 3 will take the position of server 2 and server3 will be removed, and the loop will work fine:

Vars:

%server1 asd
%server2 asd2
%server3 asd3
``` var %i = 1 while (%i <= $var(%server*,0) ) { echo -a %server [ $+ [ %i ] ] ;Returns Servers's values inc %i } } ``` Now if you unset %server2 the loop will not echo %server3 ... because it has 2 servers so it will be read %server1 and %server2 , but %server2 does not exists so it will return only %server1 with this alias when you type: /rps 2 server will unset %server2 and %server3 took its place so the alias will be continued normaly ``` %server1 asd %server2 asd3 ``` so now the loop will return: asd asd3
 Respond  
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.