CDI , that fixed me up in that same situation, try it if u can get one for cheap. Even if its not the problem, they r good to have around..
In my situation, i just fnished my full rebuild of the bike, ran it for a couple hours, go to start it in a trail and nothing, no spark. Replaced my cdi with an old ass one that worked and i havent had a prob since. Test your Stator with an Ohmeter and check the readings . Search for a post on this, youll find the right readings to compare, good luck man...