Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void object::CheckExists(int obj, bool type)
- {
- object item;
- string name;
- errmode(0);
- item=radar(obj);
- if(type == true){
- if(item == null){
- if(obj == PowerCell){
- name = "Power Source";
- message(name + " not found! Closing Program...");
- }
- else message(item.category + " not found! Closing Program...");
- turn(direction(item.position));
- }
- }
- else{
- if(item == null){
- if(obj == PowerCell){
- name = "Power Source";
- message(name + " not found! Closing Program...");
- }
- else message(item.category + " not found! Closing Program...");
- }
- }
- errmode(1);
- }
RAW Paste Data