Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Console Command Parameters

Not all of the parameters for the console command are showing in the list:

         void SetWorldTime(int hours, int minutes = 0, int seconds = 0);

shows as

SetWorldTime seconds[int32]

Is there some UFunction tag I need to add to make it show correctly? NOTE: the command works as desired. I'm asking about how it's displayed.

Product Version: UE 4.11
more ▼

asked Apr 20 '16 at 02:23 PM in C++ Programming

avatar image

110 8 10 14

avatar image CleanCut Apr 20 '16 at 05:27 PM

I don't see any documentation about it. Perhaps it is an actual bug. How do you call it correctly? Like this?

 SetWorldTime 12 30 59
avatar image NullBlack Apr 20 '16 at 05:31 PM

that is correct.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I bet it's a bonafide bug related to optional arguments. It appears that the code is counting how many required arguments there are, and then displaying that number of arguments starting from the last one.

Want to test it and see if my theory is correct? If it is, then making minutes required should give you SetWorldTime minutes[int32] seconds[int32] and making them all required would make it show correctly.

more ▼

answered Apr 20 '16 at 06:12 PM

avatar image

2.1k 67 84 77

avatar image NullBlack Apr 20 '16 at 06:45 PM

Did not work. I removed the default from minutes and from minutes and seconds; it did not change how it was listed. (It also required restarting the editor each time, WHICH IS NOT GOOD, EPIC)

If you've looked at the code behind it, is the displayed text stored somewhere (potentially requiring manual correction)?

avatar image CleanCut Apr 20 '16 at 07:23 PM

Well dang. I have no idea where the code that parses the command for display is. I looked, but the closest I could find to a definition for UFUNCTION was this line in Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectBase.h

 #define UFUNCTION(...)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question