Set the ambient_blue to 0 in the material.
Then use this:"mtl_smaragd.ambient_blue = ambl;" in a function(like the main) and it works!