How to know the next/last track?

Discussion related to Turbo Sliders and beta version feedback.

Moderator: Forum Moderators

Post Reply
lux2
Community User Level: 2
Community User Level: 2
Posts: 221
Joined: Mon Dec 29, 2008 7:22 pm
Location: Parma - Italy

How to know the next/last track?

Post by lux2 » Thu Jul 28, 2011 10:51 am

Hello, I'm maybe coming with a newbie's question.

How can I know the next/current/last trackname?

I mean: how can the bestlaps script of lvp2 know which is the next trackname?

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: How to know the next/last track?

Post by Whiplash » Thu Jul 28, 2011 11:06 am

lux2 wrote:Hello, I'm maybe coming with a newbie's question.

How can I know the next/current/last trackname?

I mean: how can the bestlaps script of lvp2 know which is the next trackname?

/track :roll:

lux2
Community User Level: 2
Community User Level: 2
Posts: 221
Joined: Mon Dec 29, 2008 7:22 pm
Location: Parma - Italy

Re: How to know the next/last track?

Post by lux2 » Thu Jul 28, 2011 12:34 pm

Please try to understand the question.

Any other answer?

lux2
Community User Level: 2
Community User Level: 2
Posts: 221
Joined: Mon Dec 29, 2008 7:22 pm
Location: Parma - Italy

Post by lux2 » Thu Jul 28, 2011 1:41 pm

Uh, forget this!

My question is more and more stupid than that you can imagine.

I was asking how to know tracknames while the tracknames list comes from my own script... what an idiot! :oops:

:D :D :D

The main problem can be solved.
Anyway, if there is a more simple way for a script to know next/last track, I'll be happy to know it.

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm
Location: Netherlands

Post by Tijny » Thu Jul 28, 2011 2:29 pm

lux2 wrote:My question is more and more stupid than that you can imagine.

I was asking how to know tracknames while the tracknames list comes from my own script... what an idiot! :oops:
That's not stupid at all, if I were in your shoes I would also try to find a more direct way to get the next track at first. Only after that would I start looking for workarounds.

On LVP #2 this isn't really handled by a server script as such. How it works is that the IRC bot reads the "Next track will be..." line in the log file, but this was really easy to do since the bot has to continuously read from the log anyway. As far as I know there isn't really an easier way to do this, other than having your track selection script remember which tracks it's chosen like you said.

lux2
Community User Level: 2
Community User Level: 2
Posts: 221
Joined: Mon Dec 29, 2008 7:22 pm
Location: Parma - Italy

Post by lux2 » Thu Jul 28, 2011 4:29 pm

My problem was exactly that I have trouble to easily read from the log.

Anyway, workaround costs only 5 lines more in the bestlap scrpt and other 3 lines more in the randomtrack one.

Since i'm not that good in php programming, i'm quite ok with my work. It's not the top, but it's enough.

Actually the script is running (or i hope so :D ) on tsb f2 server and seems to produce a correct output.

I'll surely come back again with other newbie's questions. :wink: Thank you all

Post Reply