DTextEntry crashing client with to much whitespace.

So, making a quick admin interface to view and monitor active E2 chips.

We’ve had a large spat of people spamming laggy E2 devices around and I always want to allow some of the more abusable E2 functions that we’ve blacklisted so a quicker way to monitor idiots was needed.
Before anyone screams “Noooo ma e2 codes!”, only root admins have access to the snooper features, and if you’ve server access you can view spawned e2’s via lua anyway so having a nice gui means nothing :slight_smile:

Clicking E2 shows:

Anyway it all works fine unless there is to much whitespace per line, things like:

@name e2snoopecrasher22
@persist Allow:array
Allow = array(1,2,3)
for (I=1,Allow:count()){
                                                                            Already = 1

Crash the client, any ideas why?

The clientside lua for the text entry:

local n=0
	for i in code:gmatch("
") do n=n+1 end
	n = n * 15
	if n > 1000 then n = n - 900 end

The n = n * 15 was a lazy (and probably not the best) way to get the text box to set it’s height based on lines, although I think a lines only 14.x tall.

@name Pie

Does not crash it.

@name Pie
                                                                       Apple = 1

That however does, so odd. Why should the #cake comment take mater when it’s just a string :s

Not actually sure why that would crash, but have you tried using RichText?

I have not / I shall try when able (morning most likely).

This appears to have fixed the crashing, although it seems that using SetText() has a character limit, but I can split the string and use append text.


Thanks, all working now :). Although no idea why my original idea above would crash :/.


No post merge? Wasn’t that long between posts :s

If anyone knows a nice way to add a horizontal scrollbar then lemme know.