Requesting help
-
Rassel
Im DoktorSAS. Yes is 100% an overflow problem
To fix it you need to clear string everytime after a limitinit(){ level thread overflow_fix(); } overflow_fix(){ level endon("game_ended"); level.isOverflow = false; level waittill("connected", player); level thread overflowfix(); level.stringtable = []; level.textelementtable = []; textanchor = CreateServerFontString("default", 1); textanchor SetElementText("Anchor"); textanchor.alpha = 0; limit = 54; if (IsDefined(level.stringoptimization)) limit += 172; while(!level.gameended){ if (IsDefined(level.stringoptimization) && level.stringtable.size >= 100 && !IsDefined(textanchor2)){ textanchor2 = CreateServerFontString("default", 1); textanchor2 SetElementText("Anchor2"); textanchor2.alpha = 0; } if (level.stringtable.size >= limit){ foreach(player in level.players){ player.isO = true; //inside this space put the not neaded text to "" // like player.endG SetElementText(&""); player.isO = false; } } if (IsDefined(textanchor2)){ textanchor2 ClearAllTextAfterHudElem(); textanchor2 DestroyElement(); } textanchor ClearAllTextAfterHudElem(); level.stringtable = []; foreach (textelement in level.textelementtable){ if (!IsDefined(self.label)) textelement SetElementText(textelement.text); else textelement SetElementValueText(textelement.text); } } wait 0.01; } }
Use this function to change text or text value
SetElementText(text){ if(!self.isO){ self SetText(text); if (self.text != text) self.text = text; if (!IsInArray(level.stringtable, text)) level.stringtable[level.stringtable.size] = text; if (!IsInArray(level.textelementtable, self)) level.textelementtable[level.textelementtable.size] = self; level notify("textset"); } } SetElementValueText(text){ if(!self.isO){ self.label = &"" + text; if (self.text != text) self.text = text; if (!IsInArray(level.stringtable, text)) level.stringtable[level.stringtable.size] = text; if (!IsInArray(level.textelementtable, self)) level.textelementtable[level.textelementtable.size] = self; level notify("textset"); } } DestroyElement(){ if (IsInArray(level.textelementtable, self)) ArrayRemoveValue(level.textelementtable, self); if (IsDefined(self.elemtype)){ self.frame Destroy(); self.bar Destroy(); self.barframe Destroy(); } self Destroy(); }
-
Thanks for your response, I will put it into practice right away to check the results, before receiving your suggestion I had chosen to eliminate several functions and replace the way of calling and show the Perks for this:
perkHud()
{
self endon("disconnect");
self.perkText = createfontstring("Objective", 1);
self.perkText setpoint("LEFT", "TOP", -290, -10);
while(1)
{
self.perkText settext(self getPerkDisplay());
wait 0.01;
}
}
getPerkDisplay()
{
myperks = self get_perk_array(0);
string = "PERKS: ";
for(i=0;i<myperks.size;i++)
{
string = string + "\n^6" + getPerkName(myperks[i]);
}
return string;
} -
Rassel said in Requesting help:
getPerkDisplay
use SetElementText to set all text, change all SetText with setElementText
-
Sorex
Thanks friend. I tried with the code I replaced as you recommended, and I left the screen without huds like the original game. This is not really for a private server. It is free and is played throughout the country. If someone wants to help us, here is everything in this room. so far 8 players per room and it falls every couple of hours.
https://drive.google.com/file/d/1_CB31zmqcQgDxIDAqWlFvQAdYgvWefgS/view?usp=drivesdk -
-
Cahz In effect, I'm using the Bonus Survival Maps, the last update makes zombies too easy for me, in the highest rounds they are killed with a single stab, so I tried to change the way of calculating the damage for the previous one, I have them I added the other scripts and the server continues to fail every couple of hours, usually the error that gives me (overflow) refers to the excessive use of the strings used in the perks, showing me on the screen the perks of the players, with the change that I previously published does not show any error, only the server crashes, and if I add the scripts that you suggested, I do not know the stability, but I lose both the welcome message, as the hud of life, the score, the perks,. ..Those who contribute a lot to the game. It seems that there are too many things or that it is simply not within my reach to correct it xd
-
Rassel If I'm not mistaken the Bonus Survival Maps have an overflow fix on them. Also, what map(s) are crashing?
I've ran the survival maps on a dedicated server for multiple days with no crash on Tranzit
The most recent version of MOTD maps should be stable (but I've never tested thoroughly enough to say for 100%).And any other maps should be "vanilla" which also shouldn't cause crashes....
-
Cahz I correct my previous answer, they have already solved the error of the life of the zombies in the repo, I will try adding the scripts only for Tranzit, although the Prison map or the Tomb, they are really the most liked on the server, Thanks
-
-
Cahz I need a way to check if my dedicated server is down and if so. restart it automatically. Think you can help me? I work on windows 10. not on linux. and if I could create a .bat with that function it would save me bad times.
-
Rassel for me the default.bat restart automaticaly the server when go off. If the Dedicate servers is off the only way to fix it is from the provider website