⚠️ Warning: This is a draft ⚠️
This means it might contain formatting issues, incorrect code, conceptual problems, or other severe issues.
If you want to help to improve and eventually enable this page, please fork RosettaGit's repository and open a merge request on GitHub.
These [[mIRC]] code snippets are not associated with any programming task.
=MArray Snippet= {{Lines_too_long}} '''mIRC Array Snippet'''
/*_____________________________________________________________________________
|/
/ Array snippet by Haso "sm0kie_" Keric Osah@comcast.net
| Version 0.1, released 11/06 -- support on #script/irc.gamesurge.net
| Use/modify however you want, but please keep my name in it. Thank you!
|
| Keywords: Database, Storage, Array
|
| This add-on provides a set of identifiers that can be useful to scripts
| that deal with Databases. And methods to store things.
|
| The script defines the following commands/identifiers:
|
| $array_create(
____________________________________________________________________________
*/
alias -l array_version return 0.1 Osah-Framework.
alias -l array_extension return .ray
alias -l array_url return www.hasokeric.com
alias -l array_dir return $mircdir
alias -l array.f return $array_dir $+ $1 $+ $array_extension
alias -l array.rows return $lines($array.f($1))
alias -l array.new .timer_array $3 0 write $array_dir $+ $1 $str(NUL $+ $chr(32),$2)
alias -l array.read return $read($array.f($1),$calc($3 +1))
alias array_write write -l $+ $calc($3 +1) $array.f($1) $puttok($array.read($1,$2,$3),$4,$2,32) | return * Array changed
alias array_create {
if ($2 == $null) || ($3 == $null) { return * Error, Not enough parameters. }
if ($2 > 100) { return * Error, Too many columns. > 70 | halt } | if ($file($1 $+ $array_extension) != $null) { return * Error, Array file exists. | halt }
write $1 $+ $array_extension $ctime $+ @ $+ $2 $+ : $+ $3 $+ @OSAHFRAMEWORK | array.new $1 $+ $array_extension $2 $3 | return * Created Array $1
}
alias array_destroy if ($file($array.f($1))) { remove $array.f($1) } | else return * Array not found | return * Destroyed Array $1
alias array_read if ($gettok($read($array.f($1),$calc($3 +1)),$2,32)) { return $gettok($read($array.f($1),$calc($3 +1)),$2,32) } | else return * Nothing stored at specified Column and Row