Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 ue5 suggested syntax is wrong

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
icefire555 Posted - Jan 12 2023 : 01:05:42 AM
when I try to insert into an array within Ue5 it suggests using insert (Lowercase) and that order is (index, value) while it wants (Value, Index). is this a bug?



5   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 16 2023 : 07:30:33 AM
Do you have:

VA Options -> Coloring and Attributes -> Show system symbols in italics

turned On or Off? If this is turned Off can you please turn this On, and see if "TArray" and "FVector2D" are shown in italics or not? I am wondering if VA is properly picking up and understanding your UE directory tree. If VA is doing so correctly then these class names should be shown in italics. This might explain why you are seeing such different results to the ones I am getting here.
icefire555 Posted - Jan 13 2023 : 7:11:53 PM
If I do the same, I don't see a capital insert suggestion.





I don't know if maybe we are using different versions. But I'm glad it seems correct for you. I'm fairly new to C++ for UE5.



feline Posted - Jan 13 2023 : 12:19:45 PM
Apologies, but I don't follow at all.

For the type "FVector2D" VA is taking me to the declaration in the file:

C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\CoreUObject\Public\UObject\NoExportTypes.h

and this struct contains just 2 components, "X" and "Y", no "Insert()" at all. So I assume you mean you have an array of the type FVector2D, but if so, which array type? TArray is the obvious array type, but my listbox for the code:

TArray<FVector2D> arrayOfVectors;
arrayOfVectors.in|


is quite different, suggesting you are doing something else.


icefire555 Posted - Jan 12 2023 : 2:57:41 PM
Sorry, worlddata.coordinates is a FVector2d array in a struct. However the same issue happened when using an int32 array outside of a struct.
InCoordinate is a FVector2D while XTemp is an int32.

The top line is the correct syntax which I had to go back and correct after autocompleting.
The issue is both it's suggesting lowercase insert while it will throw an error because it should be uppercase.
And the order seems to hint at (index, value) when the engine wants (Value, Index).

feline Posted - Jan 12 2023 : 12:23:14 PM
What type is the variable here? Testing with:

TArray<int> arrayNumbers;
arrayNumbers.inse|


where | is the caret, I am seeing a rather longer listbox, that contains both "insert" and the expected "Insert".

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000