mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2007
Posts: 1
G
Mostly harmless
OP Offline
Mostly harmless
G
Joined: Apr 2007
Posts: 1
Well... I installed mIRC version 6.21 about a month ago, and havent had any problems until i was scripting a program today. The problem I ran into is having mIRC not finding a the filename "global.ini" existing in a directory on my computer. For example, i ran this code earlier today:

echo 4 -a $exists($+(",$mircdir,bot/global.ini"))

output:

$false

eventhough the file exists in that perticular directory and is named global.ini mirc found it none existing. mIRC wont even write to it because it states it none existing. However, if i was to rename "global.ini" to "gobal.ini" and impliment the code as:

echo 4 -a $exists($+(",$mircdir,bot/gobal.ini"))

output:

$true

I do not know if this is a bug or if it is something that mIRC no longer supports.

Last edited by globster2000; 02/04/07 05:59 AM.
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Certain filenames cannot be used by mIRC. There are numerous posts about the reason(s), but suffice it to say, that those filenames cannot be used.

-genius_at_work

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Beyond what genius_at_work said about your question, I'll add that you can shorten that check to:

echo 4 -a $exists($mircdir/bot/gobal.ini)

As long as your filename/path is within an identifier (something starting with a $ sign and surrounded by parentheses), you don't need to worry about spaces, so quotes aren't necessary. Stuff like $read or $readini are identifiers and wouldn't need to have the quotes, for example.

However, if you use it with something that doesn't have an identifier (such as /write or /writeini), that's when you need to include the quotes. It's also good practice to have a \ or / between $mircdir or $scriptdir and the filename or folder name that follows. It will work without that right now, but that may change in a later version.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard