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
}
}

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.