Not understanding all the codes idea how it works

I have arrived to video number 103
he said in 1:14 minute that I need to remember code I have wrote it

But I read them but couldn’t understand all of them
what you suggest to do ?
For example I don’t understand what the different between FString, Float, and Void.

I think I have understood 95% of them I have point the cursor to the words in visual studio code and it has helped
also I have read about my codes through unreal engine documentation and also it has benefit me a lot

I will continue learning about my other codes

1 Like

Hi friend! I’m only learning also. I think the difference between FString, float, and void, is that these are different types of declarations.

FString String = “Text String Goes Here” ← This would be a way to declare a variable that is has the type of FString with the name of String. Then, the value of the variable is able to be filled by text, rather than numbers or a different type of information. An FString type of variable refers to a type of variable that is a string, or a line of text.

A float’s type is a number that has a decimal place, so it can be used in complex math. An example of a float is 1.1, because there is a decimal place in the numbers. A float can be 1.0 or 1.1, but would not be 1 or 2. 1 and 2 are called integers, since they don’t have a decimal point. Integers in Unreal C++ are variables of type int32.

float ThisNumber = 5.0f <---- This would be a way to declare a variable with type of float and the name of ThisNumber, and set the number to 5.0 to start.

Those all refer to types of variables, but the word void refers to a type of function.

It is used when you are declaring that a function is not going to return a different type of variable. Some functions are run in order to return something. Functions can return FStrings, floats, integers, and more, but don’t necessarily have to. If we are declaring a function that is not going to return something, which is often the case, we declare it with the word void.

void MyFunction() <— This would be a way of declaring a function that would not return anthing.

bool MyFunction() <— This would be a way of declaring a function that would return a boolean.

float MyFunction() <---- This would be a way of declaring a function that would return a float.

I hope this helps,
Cheers,
Tele

1 Like

You don’t have to understand everything in the course to continue to learn. Keep going and the understanding will come with time.

1 Like

I didn’t expect that’s great explanation that is a great favor from you
your explanation is very clear and accurate I have understood your explanation in a few minutes
I really don’t know how to thank but you have gave me a great solid explanation to my question

Best Regards,

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.