UPBGE / UPBGE-Docs

UPBGE Manual
https://upbge.org/docs/latest/manual/index.html
19 stars 15 forks source link

UPBGE Manual » Python Scripting » Introduction to Scripting: correction #28

Closed denicolas closed 3 years ago

denicolas commented 3 years ago

UPBGE Manual » Python Scripting » Introduction to Scripting https://upbge.org/manual/manual/python/introduction.html

In section "Flexible Data Types": ' The following code snip assigns the scene objects (retrieved from the game engine) to variables named after their names.

(...)

for object in scene.objects:

   exec("%s = \"object\" " % (object.name))

' The last line should be: exec("%s = object" % (object.name))

lordloki commented 3 years ago

Commited. Thanks for the fix.