Hi guys,

I have mentioned this problem on another thread, but think it deserves its 
own.

Just recompiled latest stable version (1.1.2) for 64 bits Ubuntu and reran 
my code. 

I get a weird error on the server side when using Mysql.

I get:

:TypeError: 0 is not a function

The line associated with the error does not make much sense. It is the last 
line where sql.query() is called in MYSQLConnect(). See at the bottom of 
the message!

If I remove sql.query("SET NAMES 'utf8'"); then the previous line 
sql.query('SELECT 1'); gets the error message.

Also, please note that the Mysql_get_last_match_id(); and other below all 
make a query to Mysql after that.

Finally, the error is not triggered instantly. I need to ask for a game (I 
run a game server) for it to be triggered. It really does not make sense. I 
figure the error is displayed only later on the next set of calls to 
sql.query... But it has already happened earlier.

The error does not show up in the logs themselves which prevents me from 
finding the exact moment when it is triggered... This is an error that is 
displayed on screen but not stored in the logs. I am sure you have seen 
that. Bigger errors don't appear in logs but on screen.



function MySQLConnect(ip, user, password, database) 
{
    Ape.log("MySQLConnect");
   
    var sql = new Ape.MySQL(ip + ":3306", user, password, database);
    sql.onConnect = function()
    {
        Ape.log('You are now connected to MySQL server');
        sql.query('SELECT 1');
        sql.query("SET NAMES 'utf8'");  <--------------------------- This 
is where the error comes
        Mysql_get_last_match_id();
        Mysql_get_games_info();
        Mysql_get_robots_info();
    }
    
...
...
...
}


-- 
-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

--- 
You received this message because you are subscribed to the Google Groups "APE 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to