It didn't work, I have my wallet encrypted, could be a factor?
I type
"setgenerate true 200"
in the debug window and doesn't give me any error, but if I type "getinfo" it always says
"staking status" : "Staking Not Active",
I took an old copy of the "blocks" directory (that I know is fine, I stacked more than one months after the last time I had to do it) but not joy either
restart wallet wait 5 min after it finished to sync
unlock wallet in staking mode
a encrypted wallet can not stake until u unlock it
in gui wallet with the unlock icon
in cli wallet with
walletpassphrase yourpassword 99999999 true
(9999999 is time in seconds and true means unlock for staking only)
in cli u should delete comand history to hide ur password in console