MantisBT - Soldat Dedicated Server
View Issue Details
0000539Soldat Dedicated ServerScripting Corepublic2014-02-28 01:012014-05-09 12:50
kicikici 
ExHunter 
immediatemajoralways
closedno change required 
x64Windows7 SP1
2.7.7b1 
 
0000539: Problems with Players[] array
Example - player kicikici enter to server and leave after 5 seconds.
After his leaving, variables:
Players[last kicikici's ID].Alive=true;
Players[last kicikici's ID].Human=true;
Players[last kicikici's ID].Name='kicikici';
I didn't check other variables. I am not an expert but this things should be "cleaned" after players leaving.
No tags attached.
? main.pas (848) 2014-04-29 12:55
https://bugs.soldat.pl/file_download.php?file_id=603&type=bug
jpg player.jpg (251,646) 2014-04-29 12:57
https://bugs.soldat.pl/file_download.php?file_id=604&type=bug
jpg
Issue History
2014-02-28 01:01kicikiciNew Issue
2014-04-28 16:23ExHunterNote Added: 0002231
2014-04-28 16:23ExHunterAssigned To => ExHunter
2014-04-28 16:23ExHunterStatusnew => feedback
2014-04-28 16:23ExHunterAssigned ToExHunter =>
2014-04-29 12:55kicikiciFile Added: main.pas
2014-04-29 12:57kicikiciFile Added: player.jpg
2014-04-29 13:11kicikiciNote Added: 0002234
2014-04-29 13:11kicikiciStatusfeedback => new
2014-05-09 12:21ExHunterNote Added: 0002257
2014-05-09 12:36kicikiciNote Added: 0002258
2014-05-09 12:50ExHunterNote Added: 0002259
2014-05-09 12:50ExHunterStatusnew => closed
2014-05-09 12:50ExHunterAssigned To => ExHunter
2014-05-09 12:50ExHunterResolutionopen => no change required

Notes
(0002231)
ExHunter   
2014-04-28 16:23   
When do you exactly do the check of the variables?

Do you have an example script?
(0002234)
kicikici   
2014-04-29 13:11   
In my old SC2 scripts I used IDToName(ID)<>'' to check if player is present on the server and it worked. That's why I created this ticket. But to be honest now I don't think that is something wrong with this. I can always check Players[ID].Active to be sure if player is present on server. Variables like Players[ID].Name and Players[ID].Human don't have to be restored to default.
(0002257)
ExHunter   
2014-05-09 12:21   
So I could mark this as closed? Because that's basically the point of Players[ID].Active. :)
(0002258)
kicikici   
2014-05-09 12:36   
Yes.
(0002259)
ExHunter   
2014-05-09 12:50   
Players[ID].Active makes a clean not needed.