Helpful Information
 
 
Category: RPG Integration Hack
Music Selected But Does Not Play

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);

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.

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.

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 :)

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 :)










privacy (GDPR)