- Timestamp:
- May 20, 2005, 4:18:09 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelLoader/src/util/loading/load_param.h
r4242 r4243 36 36 { 37 37 SubString subLoads(loadString); 38 (*pt2Object.*function)(subLoads.getString(0), subLoads.getString(1)); 38 if (subLoads.getCount() == 2) 39 (*pt2Object.*function)(subLoads.getString(0), subLoads.getString(1)); 40 else 41 PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", 42 paramName, pt2Object->getClassName(), 2, subLoads.getCount()); 39 43 } 40 44 else … … 49 53 { 50 54 SubString subLoads(loadString); 51 (*pt2Object.*function)(subLoads.getString(0), subLoads.getString(1), subLoads.getString(2)); 55 if (subLoads.getCount() == 3) 56 (*pt2Object.*function)(subLoads.getString(0), subLoads.getString(1), subLoads.getString(2)); 57 else 58 PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", 59 paramName, pt2Object->getClassName(), 3, subLoads.getCount()); 52 60 } 53 61 else … … 62 70 { 63 71 SubString subLoads(loadString); 64 (*pt2Object.*function)(subLoads.getString(0), subLoads.getString(1), subLoads.getString(2), subLoads.getString(3)); 72 if (subLoads.getCount() == 4) 73 (*pt2Object.*function)(subLoads.getString(0), subLoads.getString(1), subLoads.getString(2), subLoads.getString(3)); 74 else 75 PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", 76 paramName, pt2Object->getClassName(), 4, subLoads.getCount()); 65 77 } 66 78 else … … 85 97 { 86 98 SubString subLoads(loadString); 87 (*pt2Object.*function)(atof(subLoads.getString(0)), atof(subLoads.getString(1))); 99 if (subLoads.getCount() == 2) 100 (*pt2Object.*function)(atof(subLoads.getString(0)), atof(subLoads.getString(1))); 101 else 102 PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", 103 paramName, pt2Object->getClassName(), 2, subLoads.getCount()); 104 88 105 } 89 106 else … … 98 115 { 99 116 SubString subLoads(loadString); 100 (*pt2Object.*function)(atof(subLoads.getString(0)), atof(subLoads.getString(1)), atof(subLoads.getString(2))); 117 if (subLoads.getCount() == 3) 118 (*pt2Object.*function)(atof(subLoads.getString(0)), atof(subLoads.getString(1)), atof(subLoads.getString(2))); 119 else 120 PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", 121 paramName, pt2Object->getClassName(), 3, subLoads.getCount()); 101 122 } 102 123 else … … 111 132 { 112 133 SubString subLoads(loadString); 113 (*pt2Object.*function)(atof(subLoads.getString(0)), atof(subLoads.getString(1)), atof(subLoads.getString(2)), atof(subLoads.getString(3))); 134 if (subLoads.getCount() == 4) 135 (*pt2Object.*function)(atof(subLoads.getString(0)), atof(subLoads.getString(1)), atof(subLoads.getString(2)), atof(subLoads.getString(3))); 136 else 137 PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", 138 paramName, pt2Object->getClassName(), 4, subLoads.getCount()); 139 114 140 } 115 141 else … … 134 160 { 135 161 SubString subLoads(loadString); 136 (*pt2Object.*function)(atoi(subLoads.getString(0)), atoi(subLoads.getString(1))); 162 if (subLoads.getCount() == 2) 163 (*pt2Object.*function)(atoi(subLoads.getString(0)), atoi(subLoads.getString(1))); 164 else 165 PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", 166 paramName, pt2Object->getClassName(), 2, subLoads.getCount()); 167 137 168 } 138 169 else … … 147 178 { 148 179 SubString subLoads(loadString); 149 (*pt2Object.*function)(atoi(subLoads.getString(0)), atoi(subLoads.getString(1)), atoi(subLoads.getString(2))); 180 if (subLoads.getCount() == 3) 181 (*pt2Object.*function)(atoi(subLoads.getString(0)), atoi(subLoads.getString(1)), atoi(subLoads.getString(2))); 182 else 183 PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", 184 paramName, pt2Object->getClassName(), 3, subLoads.getCount()); 185 150 186 } 151 187 else … … 160 196 { 161 197 SubString subLoads(loadString); 162 (*pt2Object.*function)(atoi(subLoads.getString(0)), atoi(subLoads.getString(1)), atoi(subLoads.getString(2)), atoi(subLoads.getString(3))); 198 if (subLoads.getCount() == 4) 199 (*pt2Object.*function)(atoi(subLoads.getString(0)), atoi(subLoads.getString(1)), atoi(subLoads.getString(2)), atoi(subLoads.getString(3))); 200 else 201 PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", 202 paramName, pt2Object->getClassName(), 4, subLoads.getCount()); 163 203 } 164 204 else
Note: See TracChangeset
for help on using the changeset viewer.