mIRC Home    About    Download    Register    News    Help

Print Thread
#87108 16/06/04 08:30 PM
Joined: Jun 2004
Posts: 1
T
Mostly harmless
OP Offline
Mostly harmless
T
Joined: Jun 2004
Posts: 1
I am using Invincible script, and this is the problem:

I want to write something like this:

[21:54:19] @Nick : wadfhadf hdafhdf
[21:54:21] @Nick : Blabla blabla
[21:54:27] @Nick : Hehehehe hehehe

and I can't get something like this (up), instead i get:

[21:54:19] @Nick : wadfhadf hdafhdf
[21:54:21] @Nick : Blabla blabla
[21:54:27] @Nick : Hehehehe hehehe

The thing is that when I use more than two spaces between words, the script automatically makes that a one line between words. confused

#87109 16/06/04 09:52 PM
Joined: Dec 2002
Posts: 208
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 208
firstly, i see no difference between those 2 examles
pehraps this fourm has the same problem unless u use pre tags or
Code:
 and 


but thats not realy relevent

mIRC is a space dependent language .. this is one of the largest (at least from my own personal experence talking to users) complaints about the language itself

although mIRC is a very very nice language, even taking this one shortcomeing into acount .. there is no work around to this problem that i've been able to come up with yet myself.

so to the best of my knowledge u cant work with more than one adjacent space in a string within mIRC.

sorry,

Cobra^

#87110 17/06/04 02:14 AM
Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
$chr(160)

i know its probably not a great idea to use it, but it works perfectly as a space for me. You can have as many as you want.
Every $chr(160) counts as one space.
So:
blah $chr(160) blah
will give
blah(3 spaces)blah

if you just want 2 spaces, you can do
blah $+ $chr(160) blah

remember to turn OFF/uncheck SJIS/JIS conversion in IRC/Messages else it'll crash mIRC 6.15

#87111 17/06/04 10:12 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

Note that $chr(160) might not be a space in some fonts, but I've never encountered it.

The following alias might be handy for you:
Code:
 
alias space return $str($chr(160),$iif($1,$1,1)) 

Usage: $space or $space(N)

Example: //echo -a This $space is a string $space(4) to check out the spaces.


The remarks from Danthemandoo still stand, so $space will actually be 3 spaces in total, which is an extra of 2. If you really only want only 1 extra space then like he said you have to use $+

Example: //echo -a This $+ $space shows just 1 extra space (total of 2)

Greets

Last edited by FiberOPtics; 17/06/04 10:23 AM.

Gone.

Link Copied to Clipboard