# beginner using v2.81 basic script format error please help (creating poses) compile error

Im ultra new to blender and am using v2.81 to create some poses for a game mod.

Can someone please correct this script below so that it will compile in v2.81 as it wont compile based on the format..and i have no clue after reading up for hours about the known script error in v2.8 i just cant get my head around the issue. i do not understand scripting or coding very well despite trying to fix this all night. Also i cannot understand the blender versions below 2.8 for creating poses seem so clunky compared to the newer version,no camera navigation without pain!!!no easy way of moving bones without a nightmare .. otherwise my script would compile in earlier versions but i just cant create the poses anywhere near as accurately or as fast as in v2.81

This is where the compile error is in the log:

SelectedObject = bpy.context.scene.objects.active
Armatura = SelectedObject.data


Appreciate any help Thanks

• Why are you coding if you're not good at it? And add the whole script. – Lukasz-40sth Dec 4 '19 at 9:31
• Possible duplicate of Blender 2.8 API, python, set active object – batFINGER Dec 4 '19 at 11:25
• @Lukasz-40sth Perhaps to learn? Please be nice to other users. – Robert Gützkow Dec 4 '19 at 12:09
• @ZMD, a few things that improve one's experience on this site: The titles should be descriptive. No point mentioning you are a begginer, or that you need help - that's obvious. You should state your question in the title. Try not to use incorrect terminology. No 'format error', 'compile error', or a 'log' , no compiling here. You should get AttributeError: 'bpy_prop_collection' object has no attribute 'active' in the System or Python Console running that code, you should post the error message if you ask about it and other details. People will be nicer to you if you form questions well. – Martynas Žiemys Dec 4 '19 at 12:57
• @ Lukasz-40sth : Becuase im fairly good at game modding and require a slight adjustment to a template pre made script for my pose script to compile;) I would like to learn sure..but for now I am focused on the mod side and require a quick fix for my issue. Thank you for your reply – ZMD Dec 4 '19 at 14:03

Use bpy.context.object instead of bpy.context.scene.objects.active that does not work in 2.8x.
• @ZMD using ob = context.object and armature = ob.data as suggested above, will not throw that error. There is no collection (like scene.objects and no property "acitve" like in scene.objects.active. – batFINGER Dec 4 '19 at 14:20