Reason found:
game :: LuaGameScript: This is the main object, through which most of the API is accessed. It is, however, not available inside handlers registered with LuaBootstrap::on_load.
This addon tries to acces the game parameter while loading a saved game.
During init there is no problem, there it is allowed/possible.
Source:http://lua-api.factorio.com/0.14.22/
//edit
think it can be fixed by replacing the onload.main function to:
function main()
loadClasses.main()
end
startclasses is redundant because also called on char creation, I guess.
will test later for problems while playing, so far seems to work.