Using a variable for map_set_tile avoid memory corruption
Add parenthesis to be sure
Fix a bunch of warnings