Jump to content

Archived

This topic is now archived and is closed to further replies.

xAtlas

Call to undefined function: switch_order()

Recommended Posts

Hello,

I'm trying to help a friend with a PHP issue that he's having. He is trying to use a program called EQdkp. Basically, it pulls information from game logs, parses them and posts stats for things like items, raids (like in World of Warcraft). Anyhow, after he installed it, he's getting the following error:

[code]
Fatal error: Call to undefined function: switch_order() in /home/fhlinux184/w/wildrunners.org/user/htdocs/listmembers.php on line 33
[/code]

I do want to make note that we've posted this on their forums but nobody can seem to help us and it doesn't seem that there is even an admin for their board, which has forced us to try and seek help elsewhere. So I hope you can help.

Here is the code for the listmembers.php that it's referring to and the referring list:

[code]
$sort_order = array(
    0 => array('member_name', 'member_name desc'),
    1 => array('member_earned desc', 'member_earned'),
    2 => array('member_spent desc', 'member_spent'),
    3 => array('member_adjustment desc', 'member_adjustment'),
    4 => array('member_current desc', 'member_current'),
    5 => array('member_lastraid desc', 'member_lastraid'),
    6 => array('member_level desc', 'member_level'),
    7 => array('member_class', 'member_class desc'),
    8 => array('rank_name', 'rank_name desc'),
    9 => array('class_armor_type', 'class_armor_type desc')
);

$current_order = switch_order($sort_order);
[/code]

And here is where the $sort_order is called further in the file:

[code]$previous_source = preg_replace('/( (asc|desc))?/i', '', $sort_order[$sort_index[0]][$sort_index[1]]);[/code]



If you need more of the code, I can post that as well.
Thanks in advance.


xAtlas

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.