x

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"

[uint32] Unsigned Integers Taking Negative Values

Hello,

The following code in C++ outputs negative integers to the outputlog. I have also tried using unsigned int to no avail. I am incredibly annoyed and frustrated by this problem.

 uint32 somePosNum = 0;
 somePosNum += 100;
 UE_LOG(LogTemp, Warning, TEXT("%d"), somePosNum);
 somePosNum -= 300;
 UE_LOG(LogTemp, Warning, TEXT("%d"), somePosNum);

Prints this screen:

alt text

I don't know what I should be doing....

Product Version: UE 4.6
Tags:
result.png (9.8 kB)
more ▼

asked May 26 '15 at 01:52 AM in Bug Reports

avatar image

CanMetan
86 9 58 15

avatar image Duncan Dam May 26 '15 at 03:24 AM

what you trying to do btw ?

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

1 answer: sort voted first

You log your unsigned int using "%d" template. d - Signed decimal integer So you convert your unsigned int to signed and then log it.

If you want to log unsigned int - you must use "%u"

more ▼

answered May 26 '15 at 03:51 AM

avatar image

Detech
451 13 7 27

(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