Converting bad into not so bad - 02/12/14 03:25 PM
Ok..so its terrible bad, but I'm using that points system thing...you know the one. I'd like to go ahead and use something a little more sophisticated with them fancy hash tables and so forth but I'd like to convert the points.ini I already have into something usable for hash tables. My efforts so far have been in vain.
Ok my points file is big, its like 200k lines. This file starts running fine but eventually it just stops running or more accurately mirc just stops responding. Now...I feel like there is something wrong with how I'm writing the new ini...I think I wanted the files to look like this
filename: CHANNEL.points.ini
file:
[ChannelName]
Nick1 Points
Nick2 Points
Nick3 Points(points would be a number)
So..not only does it stop running like 1% in..but there are no new files. Obviously I'm doing something wrong..and I suspect its something pretty derpy. If anyone has any input <3
Code:
alias convert { set %line $lines(points.ini) echo there are %line lines while %line > 0 { var %templine1 $read(points.ini, n, %line) echo templine1 is %templine1 if ($chr(91) isin %templine1) { var %templine $remove($read(points.ini, n, %line), $chr(91), $chr(93)) echo running temptoken on %templine temptoken %templine echo before temppoints nick is %tempnick channel is %tempchannel and the line %templine var %temppoints $remove($read(points.ini, n, $calc(%line + 1)),Points=) echo $mid(%tempchannel,2) $+ .points.ini %tempchannel %tempnick %temppoints var %tempini $mid(%tempchannel,2) $+ .points.ini %tempchannel %tempnick %temppoints writeini -n %tempini } dec %line } } alias temptoken { echo using $1 in temptoken tokenize 46 $1 set %tempnick $2 set %tempchannel $1 echo nick is %tempnick channel is %tempchannel }
Ok my points file is big, its like 200k lines. This file starts running fine but eventually it just stops running or more accurately mirc just stops responding. Now...I feel like there is something wrong with how I'm writing the new ini...I think I wanted the files to look like this
filename: CHANNEL.points.ini
file:
[ChannelName]
Nick1 Points
Nick2 Points
Nick3 Points(points would be a number)
So..not only does it stop running like 1% in..but there are no new files. Obviously I'm doing something wrong..and I suspect its something pretty derpy. If anyone has any input <3