Displaying informative os window

Discussions about Coding and Scripting

Displaying informative os window

Postby PrinceOfFunky » Tue Dec 12, 2017 5:28 am

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:


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.
Image
User avatar
PrinceOfFunky
Godlike
 
Posts: 1020
Joined: Mon Aug 31, 2015 10:31 pm

Re: Displaying informative os window

Postby Barbie » Tue Dec 12, 2017 8:39 am

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
Barbie
Godlike
 
Posts: 1648
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Displaying informative os window

Postby PrinceOfFunky » Tue Dec 12, 2017 10:33 am

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.
Image
User avatar
PrinceOfFunky
Godlike
 
Posts: 1020
Joined: Mon Aug 31, 2015 10:31 pm


Return to Coding, Scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron