Jump to content

Recommended Posts

Posted
Parse error: parse error, unexpected ';' in /home/deathea/public_html/khaleel/xmb/shop_item.php on line 252

 

that line reads

 

>   mt_srand((double)microtime() * 10; $k++){

 

in case you need code around that line

 

>eval("echo (\"".template('shop_confirm')."\");");
 } elseif ( isset($yessubmit) ) {
	 $thatime = time();
	 if ( $self['money'] >= $item['price'] && $item['stock'] != 0 ) {
   $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
   $codepart = '';
   mt_srand((double)microtime() * 10; $k++){
  	 $codepart .= $chars[mt_rand(0, $ket)];
   }

   $thecode = $thatime.'-FunForum-'.$codepart;

Posted

From a quick look , I do as it suggests in the error, remove the ";" (it's not needed if it's within the brackets {} - but I haven't checked the code to see if the brackets are needed :)

Posted

I did that, the code is now this:

 

>eval("echo (\"".template('shop_confirm')."\")");
   } elseif ( isset($yessubmit) ) {
	 $thatime = time();
	 if ( $self['money'] >= $item['price'] && $item['stock'] != 0 ) {
   $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
   $codepart = '';
   mt_srand((double)microtime() * 10 $k++){
  	 $codepart .= $chars[mt_rand(0, $ket)];
   }

 

and it says now

 

Parse error: parse error, unexpected T_VARIABLE in /home/deathea/public_html/khaleel/xmb/shop_item.php on line 251

 

line 251 reads

 

>mt_srand((double)microtime() * 10 $k++){

Guest helpbytes
Posted (edited)

> mt_srand((double)microtime() * 10; $k++){
   $codepart .= $chars[mt_rand(0, $ket)];
  }

 

The error is referring to the $k++

 

Why is it inside the function call?

 

In addition, why is there a { after the function call?

 

Is it perhaps supposed to look like this?

 

>eval("echo (\"".template('shop_confirm')."\")");
  } elseif ( isset($yessubmit) ) {
       $thatime = time();
       if ( $self['money'] >= $item['price'] && $item['stock'] != 0 ) {
         $chars= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ012
                       3456789abcdefghijklmnopqrstuvwxyz';
         $codepart = '';
         mt_srand((double)microtime() * 10); 
         $k++;
         $codepart .= $chars[mt_rand(0, $ket)];
       }

       $thecode = $thatime.'-FunForum-'.$codepart;

Edited by helpbytes
Posted

now i get

 

 

 

Parse error: parse error, unexpected $, expecting ',' or ';' in /home/deathea/public_html/khaleel/xmb/shop_item.php(245) : eval()'d code on line 21

 

 

where 245 represents the line:

 

 

eval("echo (\"".template('shop_confirm')."\")");

 

 

and line 21 reads

 

$query = $db->query("SELECT id FROM $table_shop_items WHERE cid='$cid' ORDER BY dateline DESC LIMIT 0, 1");

Guest helpbytes
Posted

Does line 20 end with a ; properly?

Guest helpbytes
Posted

If you still haven't fixed it feel free to send it.

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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