Re: python global dictionary not saving modifications

2021-03-12 Thread AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector
Re: python global dictionary not saving modifications @6 okay, it seems what I wrote just flew over your head. my whole point wasn't that your dict is being overwritten. that is what you think is happening, but I tried to point out that it is almost definitely not the case.I was ar

Re: python global dictionary not saving modifications

2021-03-11 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: python global dictionary not saving modifications I am 99% sure that the problem here is that this code is trying to do something to the effect of modifying a dict in another module, but by importing the dict in the current module.  But it's a lot of very meh code and I don'

Re: python global dictionary not saving modifications

2021-03-11 Thread AudioGames . net Forum — Developers room : mohamed via Audiogames-reflector
Re: python global dictionary not saving modifications python sometimes gets access to a var by it own in a function and sometimes does not, So last i checked, You didn't add global varname in the function you said is not working, So maybe try doing that? URL: https://forum.audiogame

Re: python global dictionary not saving modifications

2021-03-11 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: python global dictionary not saving modifications This function and this dictionary were both in base.py before, and there were no issues. So this doesn't have to do with overwriting. I think the issue is my sys.path is in the root of the folder instead of the commands folder wher

Re: python global dictionary not saving modifications

2021-03-10 Thread AudioGames . net Forum — Developers room : Dragonlee via Audiogames-reflector
Re: python global dictionary not saving modifications this code doesn't actually share what the problem is, since this function is confirmed to work. you would need to show what is the context where the function is called after which the dict is "emptied". it also realy h

Re: python global dictionary not saving modifications

2021-03-10 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: python global dictionary not saving modifications This is for my mad libs discord bot. I decided to move the mad libs and game_keys dictionaries out of base.py and put them in madlib.py. Now it is causing issues.in base.py, with the working servers and users dictionaryimport os from

Re: python global dictionary not saving modifications

2021-03-10 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: python global dictionary not saving modifications This is for my mad libs discord bot. I decided to move the mad libs and game_keys dictionaries out of base.py and put them in madlib.py. Now it is causing issues.in base.py, with the working servers and users dictionaryimport os from

Re: python global dictionary not saving modifications

2021-03-10 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: python global dictionary not saving modifications This is for my mad libs discord bot. I decided to move the mad libs and game_keys dictionaries out of base.py and put them in madlib.py. Now it is causing issues.in base.py, with the working servers and users dictionaryimport os from

Re: python global dictionary not saving modifications

2021-03-10 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
Re: python global dictionary not saving modifications This is for my mad libs discord bot. I decided to move the mad libs and game_keys dictionaries out of base.py and put them in madlib.py. Now it is causing issues.in base.py, with the working servers and users dictionaryimport os from

Re: python global dictionary not saving modifications

2021-03-10 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
Re: python global dictionary not saving modifications Other than that, everything here is pure speculation unless you show us some code. URL: https://forum.audiogames.net/post/621873/#p621873 -- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https

Re: python global dictionary not saving modifications

2021-03-10 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
Re: python global dictionary not saving modifications I am going to assume that you're not importing it from the other file.  Remember that in Python different files are different modules, and you will need to import things from them.  BGT-style global variables don't exist.

python global dictionary not saving modifications

2021-03-10 Thread AudioGames . net Forum — Developers room : Zarvox via Audiogames-reflector
python global dictionary not saving modifications I am using 2 global dictionaries in 2 separate files. In 1 file, I can modify that global dictionary just fine. But in the other file, any time I reference or modify that dictionary, it thinks it is empty. Why is this? Even when using the