Student charged with having loaded air pistol in school