I found stable solution for server down
There are 2 players. First login to World1, second - World2. Default for all other players - World0. All names are lowercase.
When player spawn, I check login (GetName()) and move it to needed world (World1 or World2) into home as building. So, let show me cut of code:
And there I have 2 bugs:
1. Player test1 into there home building, but, in world0. Home "copy" from world1 in to world0 and destroy world0 area where home "copy".
2. When player disconnect - server go down (core dump).
Server console log:
There are 2 players. First login to World1, second - World2. Default for all other players - World0. All names are lowercase.
When player spawn, I check login (GetName()) and move it to needed world (World1 or World2) into home as building. So, let show me cut of code:
function Initialize(Plugin) -- ... Cut some code cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_SPAWNED, MyOnPlayerSpawned); -- ... Cut some code end function MyOnPlayerSpawned(Player) -- Cut some code if Player:GetName() == 'test1' then Player:MoveToWorld("world1"); elseif Player:GetName() == 'test2' then Player:MoveToWorld("world2"); end return false; end -- Cut some code
And there I have 2 bugs:
1. Player test1 into there home building, but, in world0. Home "copy" from world1 in to world0 and destroy world0 area where home "copy".
2. When player disconnect - server go down (core dump).
Server console log:
Code:
Info: [11:16:34] Player test1 has left the game
Error: [11:16:34] D: | MCServer has encountered an error and needs to close
Error: [11:16:34] Details | SIGSEGV: Segmentation fault
Error: [11:16:34] MCServer local build build id: Unknown
Error: [11:16:34] from commit id: approx: 4231dcf7e134a699cfdb7a88ff8116a123259480 built at: approx: 2015-08-16 10:26:59 +0200
Error: [11:16:34] D: | MCServer has encountered an error and needs to close
Error: [11:16:34] Details | SIGABRT: Server self-terminated due to an internal fault
Error: [11:16:34] MCServer local build build id: Unknown
Error: [11:16:34] from commit id: approx: 4231dcf7e134a699cfdb7a88ff8116a123259480 built at: approx: 2015-08-16 10:26:59 +0200
Abort trap (core dumped)