Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 ue5 suggested syntax is wrong
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

icefire555
New Member

USA
3 Posts

Posted - Jan 12 2023 :  01:05:42 AM  Show Profile  Reply with Quote
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?




Edited by - icefire555 on Jan 12 2023 3:14:33 PM

feline
Whole Tomato Software

United Kingdom
18097 Posts

Posted - Jan 12 2023 :  12:23:14 PM  Show Profile  Reply with Quote
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".

zen is the art of being at one with the two'ness
Go to Top of Page

icefire555
New Member

USA
3 Posts

Posted - Jan 12 2023 :  2:57:41 PM  Show Profile  Reply with Quote
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).


Edited by - icefire555 on Jan 12 2023 3:21:36 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18097 Posts

Posted - Jan 13 2023 :  12:19:45 PM  Show Profile  Reply with Quote
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.



zen is the art of being at one with the two'ness
Go to Top of Page

icefire555
New Member

USA
3 Posts

Posted - Jan 13 2023 :  7:11:53 PM  Show Profile  Reply with Quote
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.



Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18097 Posts

Posted - Jan 16 2023 :  07:30:33 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2021 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000