-
Notifications
You must be signed in to change notification settings - Fork 50
Manual:DIL Manual if()
iamnove edited this page Jul 9, 2022
·
51 revisions
if: The if statement is much like C. It takes any type as argument. Non integers are considered 'TRUE' if they are not null.
Example:
dilbegin foo(); code { if (self.hp>10) { exec("say Hehe!",self); } else { exec("say ouch!", self); } } dilend
Example:
dilbegin foo(); code { if (self.loaded>10) { exec("say its getting crowded!",self); } } dilend
Example:
dilbegin foo(); code { if (self.loaded<10) exec("say plenty of room!",self); } dilend
---~---~---~---~---~---~---~---~---