View Full Version : Music Selected But Does Not Play
aligold
02-07-2005, 04:16 PM
Hello, I am having some problems getting the music to work in the battles. I have added and uploaded my music files. In the control panel I can test them just fine, but they never seem to work in battles.
Also, I get the following message when clicking "Update Battle Midis"
Warning: Constants may only evaluate to scalar values in /home/katan/public_html/forum/includes/init.php on line 341
When I look at that particular line it reads as follows:
define ('REFERRER_PASSTHRU', $url);
Revan
02-07-2005, 04:48 PM
the warning will be fixed in v3, as for the midi playing I need you to tell me something.
Open battlefight.php and tell me what your $backmidi is.
Detomah
02-07-2005, 11:07 PM
I'm having the same issues as that...
if ($battle['midiid'] != 0)
{
if ($battle['midiid'] == -1)
{
$bm = $DB_site->query_first("SELECT url AS url FROM ".TABLE_PREFIX."rpg_battle_midis ORDER BY RAND()");
} else {
$bm = $DB_site->query_first("SELECT url AS url FROM ".TABLE_PREFIX."rpg_battle_midis WHERE midiid=$battle[midiid]");
}
$backmidi = "<bgsound src='$bm[url]' loop='-1'>";
} else {
$backmidi = "";
}
eval('print_output("' . fetch_template('battle_arena') . '");');
}
That's the midi bit in battlefight.php that I have.
aligold
02-08-2005, 01:34 AM
the warning will be fixed in v3, as for the midi playing I need you to tell me something.
Open battlefight.php and tell me what your $backmidi is.
My code for the $backmidi is as follows:
if ($battle['midiid'] != 0)
{
if ($battle['midiid'] == -1)
{
$bm = $DB_site->query_first("SELECT url AS url FROM ".TABLE_PREFIX."rpg_battle_midis ORDER BY RAND()");
} else {
$bm = $DB_site->query_first("SELECT url AS url FROM ".TABLE_PREFIX."rpg_battle_midis WHERE midiid=$battle[midiid]");
}
$backmidi = "<bgsound src='$bm[url]' loop='-1'>";
} else {
$backmidi = "";
}
I bvelieve I found the problem... the $backmidi variable was noplace in the battle_arena template. I put the variable in the template and it now works :)
Revan
02-08-2005, 04:58 AM
Ha, cool.
Last time I tried to fix it (mind you it was a while ago), I changed bgsound to embed.
Guess I will be noting this down and fixing it when I get home.
Cheers :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.