#error when editing file

1 messages · Page 1 of 1 (latest)

alpine ore
#

when i attempt to edit the variable it will produce a error with select files which makes the data of the file un readable to the code

quiet igloo
#

It's a little hard to tell what's going on, here, but I did notice this substring at the end of your printed output:

AST"}

The curly braces and data contained in it (before this substring) is a valid dictionary, but that bit at the end is probably what's causing problems and causing the JSON to be considered invalid? You'll want to look into what that AST"} is and where it's getting appended in your code.

alpine ore
#

its the remnants of what was their before it was changed with the gdscript

#

it doesent always show up as that

#

sometimes its just a part of what was there before

quiet igloo
#

I don't think I have enough information to help you. It looks like you're providing me with code and its output, but the output doesn't line up with the code. For example, there should be a line that reads test in the output.

It looks as if you're printing a string that was merged from substrings somehow. Can you provide me with more information that I can use to help identify the cause?

alpine ore
#

basically whats happening is the variable in province controller is being incorectly changed with the new text being shoved in front of what was already their, but not the normal way with just the text because it will edit incorrectly like ( :"GLR"}} or :"GLR"}AST} but sometimes it works completly fine with it ending with :"GLR"}. and i dont have a clue why. its supposed to replace the variable "countrie_controller":"AST"} making it "countrie_controller":"GLR"}

quiet igloo
#

Okay. So, I want to try a test.

#

In your second screenshot, there's a line where you assign prov_stats["province_controller"].

In the line before this assignment, can you print( Info_bank.ControlledNation ) and share the output?

#

I also want to direct your attention to screenshot 3. It looks as if the line is cut off, but basically I don't see an ending curly brace. It's probably there, but can you check that the closing curly brace is typed in?

alpine ore
#

also there is a } i just couldnt fit it in the screen shot

#

before

#

during 1

#

during 2 (you can see the file has broken because the tile is not set to white, but it show the correct version in the output menu)

#

end (this is the file if i accept the changes made during real time testing)

#

if attempted on this tile the output is this

fierce adder
#

you added an extra } at the end

#

wait hold on let me read the context rq