mIRC Homepage
Posted By: Armada /play displays the lines in the wrong order - 02/03/06 11:23 PM
I searched but couldnt find a post on this.
/play Filename.txt 1
I wrote a txt with 1 2 3 4 5 6 7 8 9 10 each on their own lines so a 10 line txt then tried to play it the results are like this
<@Static> 3
<@Static> 4
<@Static> 5
<@Static> 6
<@Static> 7
<@Static> 8
<@Static> 9
<@Static> 10
<@Static> 2
Its missing the first line completely and the rest are random, I am not seeing a change in the play command in the whatsnew.txt
In further playing I tried this
//var %x = 1 | while (%x <= 10) { write playtest.txt %x | inc %x }
then /play playtest.txt it skips the first line but plays the rest in the correct order.
Seems to happen on 16 also for hte first line being skipped, but I have a few ascii banners I use and the first lines are being placed at the bottom
Try using something other than numbers in your test file. It seems like /play is treating the first line as a line count (like $read does).

//var %x = 1 | while (%x <= 10) { write playtest.txt line %x | inc %x }

/play playtest.txt

-genius_at_work
Its not just numbers I just used that as an example. My Ascii thing I use is inapropriate(sp?) for this forum but its basically a giant middle finger(I know imature) The top 2-3 lines are being displayed on the bottom Ill supply a screenshot if asked I just am trying to keep this a "clean" post

EDIT
Im noticing its only when I place a 1 after the play /.play flip.txt 1 if there is no one to speed up the play it plays correctly
just a thought, try /!PLAY make sure theres no overriding alias play { }
Same thing
if thats the case then i assume there is an alias PLAY on ya system.
I checked for that already all I have a script that I wrote that filters snotices.
well then /!play well make no difference from /play, so there must be something else screwed up also.
I edited the previous post the result was the same, My window was to small so it made it wrap which in turn made it look more messed up
i cant reproduce this incorrect order effect, I can only reproduce the first line not showing, and i assume this would be caused by the same effect as NOT using the t switch in $read(file,t)

I used this to test (6.16 & 6.17)
//!write -c playtest.txt | !var %x = 1 | !while (%x <= 10) { !write playtest.txt %x | !inc %x } | !run playtest.txt | !play playtest.txt 1

1 in italics as tried with and without it.

results were
<DaveC> 2
<DaveC> 3
<DaveC> 4
<DaveC> 5
<DaveC> 6
<DaveC> 7
<DaveC> 8
<DaveC> 9
<DaveC> 10

Both locally and using a 2nd nick observing the channel
Do you have the flood protection feature enabled? If you disable it, does that resolve the issue?

The number at the beginning of the file represents the number of lines in the file. It's a legacy "feature" that unfortunately is difficult to remove since many scripts may depend on it.
you can use the reverse of you code, like that:

instead of !while(%x <= 10) you could introduce $lines(playtest.txt) who return the number of lines of the playtest.txt file and then, you acn use not a incrementation but an decrementation (dec %x), problem solved, because if your teste is reversed, reverse the text again ;P

Thats all

*
© mIRC Discussion Forums