Is there ANYTHING in this .gsc file that explains eventual crashes??
-
SO i'm hosting some servers in here and for some reason my GSC makes it crash after a couple of good minutes.
People can play to high rounds and thing but all of a sudden it crashes for no apparent reason.
there are absolutely 0 patterns. No time related, no round related, nothing.Can you guys help me?
(Yeah Identation is quite messed up but still)
/* * Black Ops 2 - GSC Studio by iMCSx * * Creator : Gangorra * Project : Teste * Mode : Zombies * Date : 2020/04/21 - 02:03:13 * */ #include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\gametypes_zm\_hud_util; #include maps\mp\gametypes_zm\_hud_message; #include maps\mp\zombies\_zm_utility; init() { level thread onPlayerConnect(); level thread drawZombiesCounter(); } onPlayerConnect() { for(;;) { level waittill("connected", player); player thread onPlayerSpawned(); player thread healthPlayer(); player thread killCount(); player thread showScore(); player thread showDiscord(); } } onPlayerSpawned() { self endon("disconnect"); level endon("game_ended"); for(;;) { self waittill("spawned_player"); // Will appear each time when the player spawn, that's just an exemple. self iprintln("^2Bem-vindo ao Zombies ^1Gangorra Aidetica!"); } } healthPlayer() { self endon("disconnect"); self.healthText = createFontString("Objective" , 1.2); //Fixed self.healthText setPoint("CENTER", "BOTTOM", -100, 20); while(true) { self.healthText setText( "^2HP: ^7"+ self.health); wait 0.5; } } drawZombiesCounter() { level.zombiesCounter = createServerFontString("Objective" , 1.3); level.zombiesCounter setPoint("CENTER", "BOTTOM", -160, 20); level thread updateZombiesCounter(); } updateZombiesCounter() { oldZombiesCount = get_current_zombie_count(); while(true) { newZombiesCount = get_current_zombie_count(); wait 0.4; if(oldZombiesCount != newZombiesCount) { level thread updateZombiesCounter(); return; } else { if(newZombiesCount != 0) level.zombiesCounter.label = &"Zumbis: ^1"; else level.zombiesCounter.label = &"Zumbis: ^5"; level.zombiesCounter setValue(newZombiesCount); } } } killCount() { i = 0; while( i < level.players.size) { if(level.players[i] == self) { self thread killCountSelf(level.players[i]); } i++; wait 0.3; } } killCountSelf(thisPlayer) { self.kill = createFontString("small" , 1.2); //Fixed self.kill setPoint("CENTER", "BOTTOM", -40, 20); while(true) { self.kill.label = &"^3Baixas: ^7"; self.kill setValue(thisPlayer.kills); wait 0.4; } } showScore() { self.scoreShow = createFontString("small" , 1.2); //Fixed self.scoreShow setPoint("CENTER", "BOTTOM", 40, 20); while(true) { self.scoreShow.label = &"^6Score: ^7"; self.scoreShow setValue(self.score); wait 0.25; } } showDiscord() { self.showDiscord = createFontString("small" , 1.0); //Fixed self.showDiscord setPoint("CENTER", "TOP", 0, -30); self.showDiscord setText("^3Discord: ^7tinyurl.com/bo2gangorra"); } -
SOLVED. And I hope it's a lesson to every new scripting learner.
ALWAYS. Instruct your open threads to finish.It solved just as easy as it sounds.
One line to each open thread. -
Locked as he solved his issue and explained further so other people who have this issue can fix it.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login