Using an extension cord with a portable air conditioner is not advised. In addition to causing air conditioners to not function properly, using an extension cord, rather than plugging the unit directly into the wall outlet, is a fire hazard.
Standard household extension cords are not designed for use with things like air conditioners. In high temperatures, extension cords do not deliver enough power for air conditioners to cycle properly. Instead of the compressor turning off at regular intervals once a room is cooled, it continues to run. This causes a dangerous buildup of heat that can cause a fire.