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"

Array Lengths and Literal Values

alt textHi there, can someone tell me why is this considered a compile error.

I outputted an array, get it's length and do an integer comparison

It makes no sense, the output is clearly an integer. If literal value is what it's having problem with, comparing two array would also give the same problem.

Apparently I found out I am unable to make any useful mathematical operations with array lenght.

Product Version: Not Selected
Tags:
array.jpg (85.6 kB)
more ▼

asked Mar 11 '14 at 02:48 AM in Blueprint Scripting

avatar image

ue4-archive ♦♦ STAFF
50k 3670 1999 9124

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

2 answers: sort voted first

The problem might be that the 'filter array' node is not being executed, is execution pin is not connected to anything.

more ▼

answered Mar 11 '14 at 02:48 AM

avatar image

ue4-archive ♦♦ STAFF
50k 3670 1999 9124

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:48 AM

hmmm.. shouldn't the execution be coming from the 'Branch' in front? similar to operation involving comparing value. Plus Error message seems to be talking about something else.

Either way I'm going to try it.

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:48 AM

If a node has execution pins, it needs to be executed to work, so you will want to connect this before the branch node that uses the result.

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:48 AM

yup apparently it works. I was assuming the execution at the further down branch will cause the preceding nodes to be activated in order to return the value.

So the error message is erroneous then i'm assuming.

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

Hi there!

sometimes you have to convert an integer to and from related types

you might try turning off the context sensitivity in the right click menu and see if there's any other integer conversions that might help with your current issue

here's a pic!

in case you didnt know, uploading pics is fine, just make sure to embed them in your posts, dont upload them to separate service.

you can use the picture button provided in this posting system :)

welcome to the epic udn forums!

alt text

Rama

intconversions.jpg (96.7 kB)
more ▼

answered Mar 11 '14 at 02:48 AM

avatar image

ue4-archive ♦♦ STAFF
50k 3670 1999 9124

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:48 AM

I don't think conversion is an issue it explicitly says the output is an integer, and it makes sense, array length is indeed an integer.

Context sensitive is also on while I search for the ">" function. This is a ridiculously simple function. But I don't rule out I'm missing something.

(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