Hi. I have a problem that I can’t figure out. I know I must be missing something and the fix is probably easy. But I am not very experienced at Kodular yet can’t seem to find the answer. I have copied the code to below, except with the following 2 changes for simplicity: The Initialize block and the ‘Populate Player Info’ procedure do not contain the other updates (label updates and other) that don’t pertain to my problem.
The issue that I am having is with the ‘global Player_Main_Weapon_Details’ variable. The ‘Update_Main_Weapon’ procedure will cycle through the ‘global Player_Main_Weapons_Table’ csv table (table that was updated from the Got Text procedure) to find a match using the 8th position in the ‘global Player_Data’ list variable (this was updated in the Initialize block). When a match is found the corresponding row of data is inserted into the ‘global Player_Main_Weapon_Details’ list variable to be used throughout the program. After the update is done, the label displays the name of the weapon chosen which is stored at position 2 of the ‘global Player_Main_Weapon_Details’ list variable. The loop then breaks as it is done. This part works fine. The problem is — When the procedure ends no other procedure is able to access the list data in the ‘global Player_Main_Weapon_Details’ list variable as an error keeps saying it’s empty/length of 0. It’s like the data is gone, even though inside the procedure the label was able to extract the data and be updated. The list only accessible within the procedure.
The code is in an attached PDF file. I tried to copy the code/screen and paste it here but it wouldn’t show anything. If there is another way to show the code in this post please let me know.
Code.pdf (116.4 KB)