mIRC Homepage

/play displays the lines in the wrong order

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
Posted By: Armada

Re: /play displays the lines in the wrong order - 03/03/06 02:01 AM

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
Posted By: genius_at_work

Re: /play displays the lines in the wrong order - 03/03/06 02:17 AM

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
Posted By: Armada

Re: /play displays the lines in the wrong order - 03/03/06 02:25 AM

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
Posted By: DaveC

Re: /play displays the lines in the wrong order - 03/03/06 02:48 AM

just a thought, try /!PLAY make sure theres no overriding alias play { }
Posted By: Armada

Re: /play displays the lines in the wrong order - 03/03/06 02:49 AM

Same thing
Posted By: DaveC

Re: /play displays the lines in the wrong order - 03/03/06 02:51 AM

if thats the case then i assume there is an alias PLAY on ya system.
Posted By: Armada

Re: /play displays the lines in the wrong order - 03/03/06 02:52 AM

I checked for that already all I have a script that I wrote that filters snotices.
Posted By: DaveC

Re: /play displays the lines in the wrong order - 03/03/06 02:55 AM

well then /!play well make no difference from /play, so there must be something else screwed up also.
Posted By: Armada

Re: /play displays the lines in the wrong order - 03/03/06 03:03 AM

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
Posted By: DaveC

Re: /play displays the lines in the wrong order - 03/03/06 04:01 AM

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
Posted By: Khaled

Re: /play displays the lines in the wrong order - 07/03/06 07:23 PM

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.
Posted By: Crash_N_Burn

Re: /play displays the lines in the wrong order - 10/03/06 02:29 AM

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

*
© 2022 mIRC Discussion Forums