Hum maybe yes... It happened when i refresh my page after 30-40 sec. Here his my code of my connexion and the code of my deluser :
Connexion : if (!$defined(params.session)) return ["6000","SESSION_NOT_DECLARED"]; var Data = new Http("http://mywebsite.fr:80/APE-" + params.session + "-getDATA.html"); Data.getContent(function (resultData) { var result = resultData.split(","); var id = result[0]; var name = result[1]; var position = result[2]; infos.user.setProperty("ID_application",id); if (!$defined($application.users[id])) { $application.users[id] = {}; $application.users[id].id = id; $application.users[id].connexion = 0; $application.users[id].name = name; var Positions = position.split("|"); var MyPositionX = Positions[0]; var MyPositionY = Positions[1]; $application.users[id].x = MyPositionX; $application.users[id].y = MyPositionY; if (!$defined($application.collision[$application.users[id].x])) { $application.collision[$application.users[id].x] = []; } if (!$defined($application.collision[$application.users[id].x][$application.users[id].y])) { $application.collision[$application.users[id].x][$application.users[id].y] = 0; } $application.collision[$application.users[id].x][$application.users[id].y]++; $application.users[id].pipe = params.pipe; if (!$defined($application.collision[MyPositionX])) { $application.collision[MyPositionX] = []; } $application.collision[MyPositionX][MyPositionY] = true; } $application.users[id].connexion++; }); infos.user.pipe.sendRaw("PN_Connexion", { 'connexion': "True" }); Deluser event : if ($defined($application.users[user.getProperty("ID_application")])) { $application.users[user.getProperty("ID_application")].connexion--; if ($application.users[user.getProperty("ID_application")].connexion === 0) { var setPosition = new Http("http://mywebsite.fr:80/APE-NONE-setPOSITION=" + user.getProperty("ID_application") + "-" + $application.users[user.getProperty("ID_application")].x + "-" + $application.users[user.getProperty("ID_application")].y + ".html"); var name = $application.users[user.getProperty("ID_application")].name; var pipe = Ape.getPipe($application.users[user.getProperty("ID_application")].pipe); if (!$defined(pipe)) return ["4400", "WHERE_S_THE_PIPE"]; $application.users[user.getProperty("ID_application")] = undefined; pipe.sendRaw('supprimerJoueur', { 'id': user.getProperty("ID_application"), 'name': name }); setPosition.getContent(); } } How can I do ? :o And i've a second question the Http request (getContent) are not executed in the same time that's the code where the request is right ? :o Le mardi 17 juillet 2012 12:56:28 UTC+2, Auryn a écrit : > > Hi everybody ! ^^ > > So i've a big problem ! :( > Sometimes in my application I received a raw "LEFT" when I didn't leave my > application (after send a command to APE wich was returned perfectly) and > it engage the command "deluser" on the server-side wich destroy my session. > After I must restart my application... :( > > What this problem ? :( > > Anyone can help me please ? > > Thanks very much ! :) > > P.S : Sorry for my bad english I'm french. ^^" > -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to ape-project@googlegroups.com To unsubscribe from this group, send email to ape-project+unsubscr...@googlegroups.com 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/