OK, thanks for that Barry.
In the functions.include.php file I have more fields than this earlier version. For example:
function queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo='',$cwignore='0',$qregex='',$queuewait='0', $use_queue_context='0', $dynmembers = '', $dynmemberonly = 'no', $togglehint = '0') {
I'd inserted the new bit of code after $use_queue_context='0' - is this right? Or should it be at the end?
function queues_add($account,$name,$password,$prefix,$goto,$agentannounce_id,$members,$joinannounce_id,$maxwait,$alertinfo='',$cwignore='0',$qregex='',$queuewait='0', $use_queue_context='0', $optionalurl=' ', $dynmembers = '', $dynmemberonly = 'no', $togglehint = '0') {
Neil