Fleet in queue, missing on the end - XNova

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Fleet in queue, missing on the end - XNova

      Hello All,

      I know it is the forum about 2Moons engine but maybe someone here can help me with one of the issue I have in my version of XNova, it was rebuilt from the start but I cna't fix one issue with fleets:

      When a player start build 100 of battleships in the hangar (system is finishing it one by one) and on the end there are always 3 or 5 missing.

      Best Regards:
      Prometheus
    • То есть у Вас во время стройки флота пропадают юниты надеюсь правильно понял суть вопроса?
    • X-nova? Как версия? Знаю что в интете сложно найти 6.1 (там нет особых багов)
      Если нужно могу дать.
    • @Yaro2709 as I've said already XNova was the base code but I've changed 95% of the code so it is hard to say what version it is ;)

      Please see my function which is used for the hangar queue:

      Source Code

      1. function SetNextStatkiOnTop ( $CurrentPlaneta ) {
      2. global $resource;
      3. $CurrentQueue = $CurrentPlaneta['kol_stoczni'];
      4. if($CurrentQueue != 0){
      5. $Statki = explode ( ";", $CurrentQueue );
      6. $licznik = count($Statki);
      7. $StatkiArray = explode(",",$Statki[0]);
      8. $Element = $StatkiArray[0];
      9. $Count = $StatkiArray[1];
      10. $CzasRobieniaOne = $StatkiArray[2];
      11. $CzasSkonczeniaAll = $StatkiArray[3];
      12. if($CurrentPlaneta['kol_czas'] <= time() ){
      13. $StatkiArray[0] = $Element;
      14. $StatkiArray[1] = $Count - 1;
      15. $StatkiArray[2] = $CzasRobieniaOne;
      16. $StatkiArray[3] = $CzasSkonczeniaAll;
      17. if($StatkiArray[1] ==0 || $StatkiArray[3] <= time() ){
      18. array_shift($Statki);
      19. $Nowa = implode(";",$Statki);
      20. $StatkiArray1 = explode(",",$Statki[1]);
      21. $Czas = time() + $StatkiArray1[2];
      22. }else{
      23. $Statki[0] = implode(",", $StatkiArray);
      24. $Nowa = implode(";",$Statki);
      25. $Czas = time() + $StatkiArray[2];
      26. }
      27. if(count($Statki) ==0){
      28. $Czas =0;
      29. }
      30. doquery("UPDATE {{table}} SET `kol_czas`='".$Czas."', `".$resource[$Element]."`= `".$resource[$Element]."`+1,`kol_stoczni` ='".$Nowa."' WHERE `id` ='".$CurrentPlaneta['id']."';",'planets');
      31. }
      32. }else{
      33. doquery("UPDATE {{table}} SET `kol_czas`='0',`kol_stoczni` ='' WHERE `id` ='".$CurrentPlaneta['id']."';",'planets');
      34. }
      35. }
      Display All