Changeset 3530 in orxonox.OLD for orxonox/branches/levelloader/src/story_entities/campaign.cc
- Timestamp:
- Mar 13, 2005, 10:40:25 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/src/story_entities/campaign.cc
r3525 r3530 22 22 #include "story_entity.h" 23 23 #include "factory.h" 24 #include "game_loader.h" 24 25 25 26 using namespace std; 26 27 28 CREATE_FACTORY(Campaign); 27 29 28 30 Campaign::Campaign () … … 37 39 { 38 40 TiXmlElement* element; 39 c harstring;41 const char* string; 40 42 int id; 41 43 … … 48 50 // grab all the necessary parameters 49 51 string = grabParameter( root, "identifier"); 50 if( string == NULL || if( sscanf(string, "%d", &id) != 1))51 { 52 PRINTF( ERR)("Campaign is missing a proper 'identifier'\n");53 setStoryId( -1);54 } 55 else setStoryId( id);52 if( string == NULL || sscanf(string, "%d", &id) != 1) 53 { 54 PRINTF(1)("Campaign is missing a proper 'identifier'\n"); 55 this->setStoryID( -1); 56 } 57 else this->setStoryID( id); 56 58 57 59 // find WorldList … … 63 65 StoryEntity* created = (StoryEntity*) loader->fabricate( element); 64 66 if( created != NULL) addEntity( created); 65 element = element-> nextSiblingElement();67 element = element->NextSiblingElement(); 66 68 } 67 69 }
Note: See TracChangeset
for help on using the changeset viewer.