
144 Cal.App.2d 827 (1956)
JOSEPH TRACY et al., Appellants,
v.
ANTON J. FERRERA et al., Respondents.
Civ. No. 16887. 
California Court of Appeals. First Dist., Div. Two.  
Oct. 5, 1956.
 Everett H. Roan and Kenneth L. Johnson for Appellants.
 Alfred Del Carlo for Respondents.
 DRAPER, J. pro tem.  [fn. *]
 Defendants' demurrer to the fourth amended complaint was sustained without leave to amend, and their motion for judgment on the pleadings was granted. Plaintiffs appeal from the resulting judgment.
 Appellants and respondents own homes on adjoining city lots. Appellants' first cause of action alleges that between April 1 and July 31, 1950, while appellants were absent, respondents erected walls, foundations, pipes and vents upon appellants' property. This cause of action clearly is in trespass. The original complaint was filed November 3, 1953. The demurrer specified Code of Civil Procedure, section 338, subdivision 2, as one of its grounds. That section fixes three years as the statute of limitations for such an action. [1] Where encroachments of a permanent nature are erected upon one's land, the remedy is by an action in trespass for all damages suffered, past as well as prospective, and the entire cause of action accrues when the trespass occurs. (Bertram v. Orlando, 102 Cal.App.2d 506 [227 P.2d 894, 24 A.L.R.2d 899].) The demurrer upon the ground of the statute of limitations was therefore properly sustained as to the first count.
 [2] The three remaining counts of the complaint, however, are based upon different allegations. In these, appellants allege that, within three years last past, respondents, upon their own land, maintained their premises without proper gutters or drainage, so as to deflect rain water from respondents' premises upon those of appellants, and also so maintained pipes and furnaces as to cause the emission of noxious odors and fumes upon appellants' property. Here there is no allegation of trespass. Rather, the offending structures are alleged to be upon respondents' land, and complaint is made, not of their location, but of the use to which they are put. Clearly these counts allege the maintenance of a nuisance by respondents. (Dauberman v. Grant, *829 198 Cal. 586 [246 P. 319, 48 A.L.R. 1244]; Willson v. Edwards, 82 Cal.App. 564 [256 P. 239]; Civ. Code,  3479.) The statute of limitations is not, on the face of the complaint, a bar to these three causes of action, because it is alleged that the acts occurred within three years. Even if this were not alleged, appellants might treat respondents' use of their own land as a continuing nuisance, and bring successive actions until it was abated. (Spaulding v. Cameron, 38 Cal.2d 265 [239 P.2d 625].)
 Each of the last three counts of the complaint, whatever its vulnerability to demurrer for uncertainty, appears to state facts sufficient to constitute a cause of action. Respondents do not seriously contend to the contrary, but rely upon the statute of limitations to justify the sustaining of the demurrer. As pointed out, the statute does not bar these three causes of action. Thus the general demurrer was improperly sustained as to them.
 [3] The motion for judgment on the pleadings raised the issue of res judicata. Respondents contend that a 1950 judgment was entered in their favor upon facts comparable to those set forth in one of the causes of action of the present complaint, and that counts comparable to the other causes of action of the present complaint were thereupon dismissed with prejudice. But such an issue cannot be raised upon a motion for judgment on the pleadings. On such a motion, the court cannot consider any matter outside the complaint. (Douglass v. Dahm, 101 Cal.App.2d 125 [224 P.2d 914].) The amended complaint here contains no reference to any other action. Further, the record before us contains nothing to show the nature of any such action. The motion for judgment on the pleadings was improperly granted.
 The demurrers for uncertainty appear, at least in part, to be well taken. [4] However, as to three counts, we have pointed out that appellants can amend so as to state a proper cause of action. In these circumstances, it is an abuse of discretion to sustain the special demurrer without leave to amend. (Guilliams v. Hollywood Hospital, 18 Cal.2d 97 [114 P.2d 1].)
 The judgment is reversed as to the second, third and fourth causes of action, with directions to the trial court to grant appellants leave to amend as to these counts of their complaint.
 Nourse, P. J., and Kaufman, J., concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
