Search the Community
Showing results for tags 'variables'.
-
I don't know why but my script does not update the value that is assigned to variable structure_count. function STRU_dataBlockSegments() local STRU_structures = {} local structure_count = 1 -- value of that needs to be incremented local STRU_struct_offset = 1 local STRU_structureNaming = { [1] = "Structure ("..structure_count..") :Unknown: ", [2] = "Structure ("..structure_count..") :Field offset: ", [3] = "Structure ("..structure_count..") :Field amount: " } local STRU_block = STRU_dataBlockSize() for i, v in ipairs(STRU_block) do STRU_structures[#STRU_structures + 1] = {address = v.address, flags = gg.TYPE_BYTE, name = STRU_structureNaming[STRU_struct_offset]} if STRU_struct_offset == 3 then STRU_struct_offset = 1 structure_count = structure_count + 1 -- Should be incremented by one, however in the table STRU_structureNaming it remains 1. else STRU_struct_offset = STRU_struct_offset + 1 end end end STRU_dataBlockSegments() How do i access the table STRU_structureNaming and increment the value structure_count when condition is met?
-
basically I just tried to use my old script. As far as I know it works perfectly on 87.5, but I updated my GG like 5-minutes ago and that's what happened (screenshot) the part of code: fly_save = 9.11F I tried just to hide it with -- and it stop crashing so there is something in syntax, but I don't have any idea what's happened cause it works correctly on GG 87.5 <. Maybe there is something changed in new versions but I didn't found anything in changelogs.