Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: $ifequal and non-integers (Read 1964 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

$ifequal and non-integers

i fear this might be obvious;

$ifequal only compares integers(...-1,0,1...) right?

so if you wanted to compare two non-integers like, just as an example
a variable you have set... $setpvar(title,%title%)
and the current playing title... %title%

how would you go about this?

$ifequal and non-integers

Reply #1
To compare strings, use $strcmp or $stricmp. Read the titleformat reference for further information.

Example:
Quote
$if($strcmp(%title%,Whatever),Something,SomethingElse)

PS: I guess the $setpvar function has been introduced by a 3rd party component. Please do not assume that every forum member knows about that, and name the component and/or describe the function in detail.

$ifequal and non-integers

Reply #2
dang, i knew it would be simple, sorry i overlooked it, there are just so many 

and for those reading this that don't know, $setpvar and $getpvar are part of the Panels UI(foo ui panels) component

Quote
$setpvar[/color](name,value)
$getpvar(name)
 
  • Variable similar to common variable operations ($put, $puts & $get) plus the ability to keep permanently its value.
  • Can be set/accessed anywhere thoughout Panels UI (Panels UI itself + Track Display and Single Columns Playlist).
[/li][/list]