Displaying informative os window

Discussions about Coding and Scripting
Post Reply
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Displaying informative os window

Post by PrinceOfFunky »

Idk if someone ever used BrushBuilder native functions at runtime, but BadParameters() displays an informative os window even while playing.
I don't know much about C yet, but if I try displaying a character followed by '%' it gets replaced by something else:
tQtOeT7w10E

This is the code:

Code: Select all

local CubeBuilder testBB;
	
	testBB = new class'CubeBuilder';
	testBB.BadParameters("STRING TO DISPLAY GOES HERE");
	testBB = None;
Also, if the viewport window is not on fullscreen, it won't minimize to system tray when the informative window appears.
"Your stuff is known to be buggy and unfinished/not properly tested"
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Displaying informative os window

Post by Barbie »

PrinceOfFunky wrote:I don't know much about C yet, but if I try displaying a character followed by '%' it gets replaced by something else
I guess the usual format identifier are used: https://en.wikipedia.org/wiki/Printf_format_string
Because the UScript function definition of BadParameters() allows only one parameter (the message itself) and no dynamic value array, I guess that the values you have seen are random stack values. Did the values change on different sessions?

PS: Have you tried "%s" also? May be a funny display value... ^^
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
PrinceOfFunky
Godlike
Posts: 1200
Joined: Mon Aug 31, 2015 10:31 pm

Re: Displaying informative os window

Post by PrinceOfFunky »

Barbie wrote:Did the values change on different sessions?
%f never changes, it's always 0.00000 . (1:00 in the vid)
Barbie wrote:PS: Have you tried "%s" also? May be a funny display value... ^^
Yes, on 0:57, but then it displayed nothing after I tried again.
"Your stuff is known to be buggy and unfinished/not properly tested"
Post Reply