or perhaps:
chess_answer_list.append( (str(correct_value), True))
others = renpy.python.rng.sample( [k for k in range(-7,0) ]+[ k for k in range(1,8) ], 4 ) ## <-- get 4 unique choices from the list (without zeros)
for k in others:
chess_answer_list.append( (str(correct_value + k), False))
[SOLVED] Trying to create a simple math minigame. Strange list index out of range error?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Trying to create a simple math minigame. Strange list index out of range error?
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Who is online
Users browsing this forum: apocolocyntose, Bing [Bot], DewyNebula