You should not be using memory viewer to apply the cheats, since it only writes to the RAM once and not continuously, which is required for most codes to work properly (which is also why I prefer to use JGecko U and not trainers).
Try adding the code to the the Cheats section of JGecko U, then...