• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

ZnoteAcc Convert database (Fatal Error)

Xaqiion

New Member
Joined
May 8, 2015
Messages
11
Reaction score
1
Hello.
Is planing to move my otserver to a server computer i have build and setup at home.

I thought i give Znoteaac a try and saw i could convert my database to znote's aac
But when i try i get this error
Fatal error: Call to undefined function elapsedTime() in C:\xampp\htdocs\engine\database\connect.php on line 286

its part of this function
The error points att the arrow in the code

Code:
// Selecting multiple rows from database.
function mysql_select_multi($query){
  global $connect;
  global $aacQueries;
  $aacQueries++;
  global $accQueriesData;
 -> $accQueriesData[] = "[" . elapsedTime() . "] " . $query;
  $array = array();
  $results = mysqli_query($connect,$query) or die(var_dump($query)."<br>(query - <font color='red'>SQL error</font>) <br>Type: <b>select_multi</b> (select multiple rows from database)<br><br>".mysqli_error($connect));
  while($row = mysqli_fetch_assoc($results)) {
      $array[] = $row;
  }
  return !empty($array) ? $array : false;
}

Im terrible with Php and i cant find anything about it on the forum.
Do anyone had this problem and know a solution?
 
Are you using the right znote version to your tfs launcher? And do you get the same error if you use uniformserver?
 
You're trying to call a function elapsedTime() that isn't defined. In ZnoteAAC, this function is found in engine/init.php. I guess you're trying to run something without including this init file.
 
@Himii Im using TFS 1.0 and ZnoteAcc 1.5
Im getting the same error with Xampp, Wamp and UniForm Server.

@Anti
Im doing a Database convert that follows ZnoteAcc in the special folder.
Cant access me server at the moment but shouldnt that file be included when the function is aviable when i unzip the fresh downloaded file from git?
 
i get the same error:
Fatal error: Call to undefined function elapsedTime() in C:\xampp\htdocs\engine\database\connect.php on line 287


when adding:

require '../engine/init.php';


Warning: require_once(layout/sub.php): failed to open stream: No such file or directory in C:\xampp\htdocs\engine\init.php on line 129

Fatal error: require_once(): Failed opening required 'layout/sub.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\engine\init.php on line 129
 
Add this in engine/function/general.php:
PHP:
function elapsedTime($l_start = false, $l_time = false) {
    if ($l_start === false) global $l_start;
    if ($l_time === false) global $l_time;
  
    $l_time = explode(' ', microtime());
    $l_finish = $l_time[1] + $l_time[0];
    return round(($l_finish - $l_start), 4);
}
Find that function in init.php and remove it, otherwise you will get an error about redeclaring the function later.
I think there are still some issues with special/database2znoteaac.php. I opened a pull request earlier today, so hopefully some of them should be fixed soon.
 
Add this in engine/function/general.php:
PHP:
function elapsedTime($l_start = false, $l_time = false) {
    if ($l_start === false) global $l_start;
    if ($l_time === false) global $l_time;

    $l_time = explode(' ', microtime());
    $l_finish = $l_time[1] + $l_time[0];
    return round(($l_finish - $l_start), 4);
}
Find that function in init.php and remove it, otherwise you will get an error about redeclaring the function later.
I think there are still some issues with special/database2znoteaac.php. I opened a pull request earlier today, so hopefully some of them should be fixed soon.

ok that worked (thx) but i still having the same error executing
convertoldshoppoints.php

Fatal error: Call to undefined function elapsedTime() in C:\xampp\htdocs\engine\database\connect.php on line 287

im no t a coder myself but im trying to learn from you guys
 
From which AAC you're moving?

Conversion of database is not working in 100%, Znote told me he will work on this (gesior -> znote) soon.
 
Back
Top