mIRC Homepage
Posted By: Skeletor Setting a better directory - 16/02/06 01:08 AM
Is there a better way of setting my varible up?

Code:
 %nl.operator C:\Program Files\VTEC §cript Platinum ®\Icons\Operator.ico 


some thing like $mircdir... but i would like it so no matter where the script is installed to, it will find it. I remeber seeing something like $findfile, but I can't for the life of me find it.

Any ideas guys?
Posted By: DaveC Re: Setting a better directory - 16/02/06 01:35 AM
Assuming the ICONS folder is under the folder the script is in? if so
%nl.operator $+($scriptdir,Icons\Operator.ico)
Posted By: Skeletor Re: Setting a better directory - 16/02/06 01:54 AM
That works a treat, Thank you.
Posted By: Skeletor Re: Setting a better directory - 16/02/06 02:28 AM
Further Question...

Original:
Code:
  Hide 12 Apply 1 Script/ "C:\VTEC §cript Platinum ®\Themes\vtecGOLD.mrc"	 CurScheme 10 TimestampFormat 11[11 HH:nn:ss 11]	 mUnzipDir! C:\VTEC §cript Platinum ®\Themes\ ThmDir! C:\VTEC §cript Platinum ®\Themes\	 CurOTheme/ "C:\VTEC §cript Platinum ®\Themes\vtecGOLD.mts" GZipDir! C:\VTEC §cript Platinum ®\Themes\ CurTheme/ "C:\VTEC §cript Platinum ®\Themes\vtecGOLD.mts" Cache 3 FRep.Status 0 


Changed to:
Code:
  Hide 12 Apply 1 Script/ "$+($scriptdir,Themes\vtecGOLD.mrc)" CurScheme 10 TimestampFormat 11[11 HH:nn:ss 11]	 mUnzipDir! $mircdir\Themes\ ThmDir! $mircdir\Themes\	 CurOTheme/ "$+($scriptdir,Themes\vtecGOLD.mrc)" GZipDir! $mircdir\Themes\ CurTheme/ "$+($scriptdir,Themes\vtecGOLD.mrc)" Cache 3 FRep.Status 0 


Would the above Work?
Posted By: schaefer31 Re: Setting a better directory - 16/02/06 02:55 AM
The best way to answer that would be to try it yourself. Though, it looks to be ok from a glance.
Posted By: Skeletor Re: Setting a better directory - 16/02/06 03:17 AM
This is the error msg...

* /hload: error loading hash table 'Kte_Data' from 'Kte-Data.dat' (line 76, system.mrc)

Here is my line 76:

Code:
  _hmake Kte_Data 8 | if ($isfile($kte_file(Kte-Data.dat))) { hload -b Kte_Data $kte_file(Kte-Data.dat) } 


This is the Kte-Data.dat

Code:
  Hide 12 Apply 1 Script\ "$mircdirThemes\vtecGOLD.mrc"	 CurScheme 10 TimestampFormat 11[11 HH:nn:ss 11]	 mUnzipDir! $mircdir\Themes\ ThmDir! $mircdir\Themes\	 CurOTheme/ "$mircdirThemes\vtecGOLD.mts" GZipDir! $mircdirThemes\ CurTheme/ "$mircdirThemes\vtecGOLD.mts" Cache 3 FRep.Status 0 


I have installed the script to my 'C:\Program files\Vtec script'

Any Ideas?
Posted By: DaveC Re: Setting a better directory - 16/02/06 04:33 AM
$+(something,somethingelse,andonemorething) joines them together into somethingsomethingelseandonemorething

But your example wont work becuase you cant just stick " on the front and end of a $+( ) like that.
You can however put them on the inside.

$+(",$scriptdir,Themes\vtecGOLD.mrc")

becuase then they become part of what your joining up. (concatanating)
Posted By: DaveC Re: Setting a better directory - 16/02/06 04:34 AM
Code:
  _hmake Kte_Data 8 | if ($isfile($kte_file(Kte-Data.dat))) { hload -b Kte_Data $+(",$kte_file(Kte-Data.dat),") } 


try that.
Posted By: Skeletor Re: Setting a better directory - 16/02/06 04:39 AM
Thats made a great improvement, Cheers grin grin
© mIRC Discussion Forums