You defined the BMAPs after function main() but you used the bmaps in function main().

Move the definition of all the bmaps BEFORE main()

Remember that before you use anything, functions, variables, bmaps, etc, it must be declared and/or defined.