234 } |
234 } |
235 |
235 |
236 bool ScriptReader::BoolValue () { |
236 bool ScriptReader::BoolValue () { |
237 return (!token.compare ("1") || !token.compare ("true") || !token.compare ("yes")); |
237 return (!token.compare ("1") || !token.compare ("true") || !token.compare ("yes")); |
238 } |
238 } |
|
239 |
|
240 void ScriptReader::MustValue (int type) { |
|
241 switch (type) { |
|
242 case RETURNVAL_INT: MustNumber (); break; |
|
243 case RETURNVAL_STRING: MustString (); break; |
|
244 case RETURNVAL_BOOLEAN: MustBool (); break; |
|
245 } |
|
246 } |