![]() |
|
#1
|
|||
|
|||
![]()
Seems the problem is the
Timeout(12, () => may be the player is no longer valid after 12 sec, can you test it without the timeout or a shorter one? |
#2
|
|||
|
|||
![]() Quote:
I am still sitting and waiting in my aircraft after 12 seconds, so both a player and an aircraft exist. Why can he be invalid? PS. Sorry, maybe I did not explain it in detail. Timeout(12, () => is related to Code:
msgTooManyAircraft(player); showTestMsg(player); Code:
Timeout(20, () => { msgCurrentObjectives(player); // current objectives }); The part which does not work is Code:
//// NET settings msg - do not work on dedicated server, works on hosted server for host at least //// prevents several lines of code from execution, e.g. current109s++ does not work //sendScreenMessageTo(player, new string[] { "ru" }, "Please set your NET speed to ISDN in game network settings. This is needed for server testing purposes.", null); //sendScreenMessageTo(player, "ru", "Пожалуйста, поставьте в настройках игры скорость сети 'ISDN'. Это нужно для тестирования сервера.", null); //Timeout(7, () => // 2nd part //{ // sendScreenMessageTo(player, new string[] { "ru" }, "Please report on 1C Clifs of Dover forums if this helps reducing lag.", null); // sendScreenMessageTo(player, "ru", "Пожалуйста, сообщите на форуме sukhoi.ru уменьшает ли это лаги.", null); //}); //sendChatMessageTo(player, new string[] { "ru" }, "Please set your NET speed to ISDN in game network settings. This is needed for server testing purposes. Please report on 1C forums if this helps reducing lag.", null); //sendChatMessageTo(player, "ru", "Пожалуйста, поставьте в настройках игры скорость сети 'ISDN'. Это нужно для тестирования сервера. Пожалуйста, сообщите на форуме sukhoi.ru уменьшает ли это лаги.", null); And the complete code of OnTickGame sends messages only offline or on a hosted server to the host. Does not send messages to remote player on a dedicated server. Last edited by Ataros; 10-11-2011 at 07:34 PM. |
#3
|
|||
|
|||
![]()
At the moment its only a possibility.
You get a "Object reference not set to an instance of an object" Error. Thats means the script would use a object wich is null, but at the moment i dont see why the player should be null at the moment OnPlaceEnter is active, so may be its null after 12 sec. At time i dont trust the memory management of a dedicated server ![]() |
#4
|
|||
|
|||
![]()
Edited the previous post a bit. The messages sent after 12 seconds are delivered.
|
#5
|
|||
|
|||
![]()
GamePlay.gpRemotePlayers().Length <= 0 should be the bug (to silly btw) GamePlay.gpRemotePlayers().Length > 0 is the correct version.
Next time i should test my code on Multiplayer conditions before give it to the public. Shame on me. latest version: http://forum.1cpublishing.eu/showpos...8&postcount=41 Last edited by FG28_Kodiak; 10-12-2011 at 11:31 AM. |
#6
|
|||
|
|||
![]()
Thank you very much! You know mistakes are a pathway to future success.
So, the "NET message" in OnPlaceEnter will also work I hope. Will try it tonight hopefully. |
#7
|
|||
|
|||
![]()
I am using about 10-20 timeout statements in onTickGame to send messages. Does it slow down server processor if server has to count 10-20 timers at the same time or not?
Maybe it should be optimized to have only one timer? |
![]() |
|
|