Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
i mean, its not a huge problem to deal with, just makes the code less read-able and it took a while to figure out where the problem was but it just infuriated me abit and i wanted to see if anyone else has noticed it.
The bigger issue i've noticed is with lists (while is an extension of the variable issue)
sometimes manipulating lists just straight up dosent work.
append works perfectly but remove has like a 5% chance of not doing anything.
i've tested it out with random_list.remove(max(random_list)) and yea, sometimes it just fails to remove anything.
(i've tested it by filling random_list with the measure() of 4 fields worth of flowers and then doing
quick_print(len(random_list))
random_list.remove(max(random_list))
quick_print(len(random_list))
)
The two code snippets do different things, the second version only looks at the drone's position at the start of the snippet and then moves relative to that, whereas in the first version the first set of horizontal movement can affect the second. You could chain your statements with 'elif' if you specifically only wanted to execute a single branch rather than run multiple comparisons with side-effects.
I'm probably missing the point of your query, but it's hard to say without a better example of what you're seeing.
edit: It's possible that the remove operation is failing to find which element to remove based on floating point inaccuracy, but max should return an exact value so that seems unlikely. The above example seems to work reliably with inexact values too.
I'm having the same issue. Randomly get_pos seems to output a number while in between two tiles.
Below is what i have:
However when I add a delay by asking it to print its position it doesn't hang: