Jump to content

Parse error: syntax error, unexpected T_STRING


Mavrik347

Recommended Posts

Parse error: syntax error, unexpected T_STRING in /home/****/public_html/ts3O/cron.php on line 61

 

 

Hi guys, first time here, hoping I could get some help on something. Having a bit of a hard time :/

 

Here is the area of code.

try {
$ts = TeamSpeak3::factory("serverquery://".$c->tsname.":".$c->tspass."@".$c->tshost.":".$c->tsport."/");
$virt = $ts->serverGetByPort($c->tscport);
if ($c->usesta == true) {
	$virt->serverGroupClientDel($c->stagroup,$cid);
}
else {
	$virt->clientdbdelete cldbid=($cid);  //LINE 61
}
}

 

 

Below is the version used before... The problem with this however is it's the wrong command. The command (output) I need is "clientdbdelete cldbid=$cid" e.g. "clientdbdelete cldbid=49". But the old line 61 that doesn't generate an error's output is "serverGroupClientDel 2,49"

 

 

 

try {
$ts = TeamSpeak3::factory("serverquery://".$c->tsname.":".$c->tspass."@".$c->tshost.":".$c->tsport."/");
$virt = $ts->serverGetByPort($c->tscport);
if ($c->usesta == true) {
	$virt->serverGroupClientDel($c->stagroup,$cid);
}
else {
	$virt->serverGroupClientDel($c->group,$cid);  //LINE 61
}
}

It's a Teamspeak 3 query to delete registrations.

 

Edit: What if I used

 

$clientdbdelete = "clientdbdelete cldbid=";
$virt->$clientdbdelete($cid);

 

Or would that just generate the same error?

 

That stopped the error, but how can i be sure the output is what I want?

clientdbdelete may be a teamspeak 3 command, but it's not a php method name.  You'll need to find which php method corresponds to it.  For example, it might be something like $virt->ClientDbDelete($cid).

 

Alternatively, if the teamspeak3 object lets you send raw commands you could try it like that too.

clientdbdelete may be a teamspeak 3 command, but it's not a php method name.  You'll need to find which php method corresponds to it.  For example, it might be something like $virt->ClientDbDelete($cid).

 

Alternatively, if the teamspeak3 object lets you send raw commands you could try it like that too.

Found it! clientDeleteDb

 

Only now I get "TS interface error: invalid parameter count". But I guess that's a question for the teamspeak forums.

 

Thanks so much for the help.

 

http://www.sev3rance.com/ts3O/cron.php

Archived

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

×
×
  • Create New...

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.