Forum

> > CS2D > Scripts > hudtxt crash random clients
Forums overviewCS2D overview Scripts overviewLog in to reply

English hudtxt crash random clients

4 replies
To the start Previous 1 Next To the start

old hudtxt crash random clients

xNir
User Off Offline

Quote
Hi everyone,

I've recently faced this issue today and I didn't manage to fix it correctly.

First this is the part of the code which causes crashes:

1
2
3
4
5
function warmod.clear_all_texts()
	for i = 0, 48 do -- 49 used for version
		parse('hudtxt ' .. i)
	end
end

When I call this function from a script no matter the current state of the round, some players (mostly high pingers) tends to crash for no reason. This is a snippet from my project warmod: https://github.com/codneutro/warmod. A thing to know is that I never use all the texts IDs I only used from this range to 0 from 15. So I wonder if clearing unwritten texts would lead to problems ?

My question are:
- Is this snippet valid ?
- Why only few people crashes and not everybody ?
edited 2×, last 31.10.16 12:31:09 am

old Re: hudtxt crash random clients

Bowlinghead
User Off Offline

Quote
The snippet is valid according to this by syntax.
As you say you delete much non exisiting textboxes
Maybe you want to count each individual txt id you used to remove them later on?

Anyway do you use other scripts with hudtxt/2?

old Re: hudtxt crash random clients

xNir
User Off Offline

Quote
Edit:

Ok, I figured out. The only way to solve its to keep track of what texts IDs you used.
edited 1×, last 31.10.16 10:54:50 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview