Problem: I cant get it to ether store or give me the information inside the string arrays. Is this not possible within a function? Or is it some sort of glitch. But when i call to get information from the string it prints out blank.
What the code does(If needed):
I’m having an issue with my item system. I’m trying to make an item system that stores items based off id then ill have a function library that stores any item information that is needed that can be access by giving the correct id.
Extra Information(Probably not needed):
The properties function input has nothing to do with the problem.
I’m using unreal engine 4.7.6 because 4.8.1 and 4.8.0 crashes on start up and corrupted my game already and i had to rebuild
have you tested if it works with single strings, instead of string arrays?
using local Variables inside a function, to store long term data, seems strange to me. in c++, local Variable data goes out of scope when the function ends. if you want to mix data and functions, usually you would use an Actor Blueprint. if you just want to store data, maybe you should use a CSV dataTable.
local variables are supposed to be temporary storage that only exists while the function is running.
Yah i suppose it would be better to do that. I’m more use to code so it weird getting into visual scripting. so i was experimenting with a way i could organize a large amount of data that any actor in the world can call from. But i still need to remember its translated from visual scripting to c++ code. In my mind i though that it was creating a string like string Item_Names[5] = {"wood", "1", "2". "3", "4" };
But my guess is that the get node is getting confused because a string is really an array and that would be storing a pointer to a array in a string. char Item_Names[5][10]; so if i writes it like this in c++ it might get confused.