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 incrementedlocal STRU_struct_offset =1local 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 ==3then
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 +1endendend
STRU_dataBlockSegments()
How do i access the table STRU_structureNaming and increment the value structure_count when condition is met?
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Question
nok1a
I don't know why but my script does not update the value that is assigned to variable structure_count.
How do i access the table STRU_structureNaming and increment the value structure_count when condition is met?
9 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now