Index: /branches/preferences/src/lib/parser/cmdline_parser/cmdline_parser.cc
===================================================================
--- /branches/preferences/src/lib/parser/cmdline_parser/cmdline_parser.cc	(revision 7242)
+++ /branches/preferences/src/lib/parser/cmdline_parser/cmdline_parser.cc	(revision 7243)
@@ -57,5 +57,23 @@
   
   for ( int i = 1; i<argc; i++ )
-    args.push_back( argv[i] );
+  {
+    std::string s = argv[i];
+    
+    if ( s.find( "=" ) == std::string::npos )
+    {
+      args.push_back(s);
+    }
+    else
+    {
+      std::string op = s;
+      std::string ar = s;
+      op.erase( op.find("=") );
+      ar.erase( 0, ar.find("=")+1);
+      
+      PRINTF(0)("'%s' '%s'\n", op.c_str(), ar.c_str());
+      args.push_back( op );
+      args.push_back( ar );
+    }
+  }
   
   int i = 0;
@@ -76,10 +94,11 @@
         if ( it->numArgs + i >= args.size() )
         {
-          PRINTF(1)( "%s needs %d arguments!", args[i].c_str(), it->numArgs );
+          PRINTF(1)( "%s needs %d arguments!\n", args[i].c_str(), it->numArgs );
+          return false;
         }
         
-        std::vector<std::string> argArgs;
+        std::vector<MultiType> argArgs;
         
-        for ( int j = 0; j < it->numArgs; j++ )
+        for ( int j = 1; j <= it->numArgs; j++ )
           argArgs.push_back( args[i+j] );
         
@@ -87,5 +106,5 @@
           return false;
         
-        i += it->numArgs;
+        i += it->numArgs + 1;
         
         if ( finish )
@@ -121,14 +140,16 @@
       arg.erase( 0, 2 );
       
-      if ( arg.find('%') != std::string::npos )
+      if ( entry.longOption.find('%') != std::string::npos )
       {
         //TODO implement bether match algo
-        assert( arg.find('%') == arg.length()-1 );
-        arg.erase( arg.length()-1, 1 );
-        return entry.longOption.find( arg ) == 0;
+        assert( entry.longOption.find('%') == entry.longOption.length()-1 );
+        std::string lo = entry.longOption;
+        lo.erase( lo.length()-1, 1 );
+        PRINTF(0)("%s %s\n", arg.c_str(), lo.c_str());
+        return arg.find( lo ) == 0;
       }
       else
       {
-        return entry.longOption == arg;
+        return arg.find( entry.longOption ) != std::string::npos;
       }
     }
@@ -140,5 +161,5 @@
         return false;
       }
-      finish = false;
+      finish = arg.length()==2;
       return arg.find(entry.shortOption) != std::string::npos;
     }
Index: /branches/preferences/src/lib/parser/cmdline_parser/cmdline_parser.h
===================================================================
--- /branches/preferences/src/lib/parser/cmdline_parser/cmdline_parser.h	(revision 7242)
+++ /branches/preferences/src/lib/parser/cmdline_parser/cmdline_parser.h	(revision 7243)
@@ -12,4 +12,5 @@
 
 #include "src/defs/debug.h"
+#include "src/lib/util/multi_type.h"
 
 
@@ -24,5 +25,5 @@
 typedef std::list<ArgTableEntry> ArgTable;
 
-typedef bool (ArgParserCallback)( ArgTableEntry, void*, const std::string &, const std::vector<std::string> & );
+typedef bool (*ArgParserCallback)( ArgTableEntry, void*, const std::string &, const std::vector<MultiType> & );
 
 
Index: /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.cc
===================================================================
--- /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.cc	(revision 7242)
+++ /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.cc	(revision 7243)
@@ -18,4 +18,6 @@
 #include "cmd_line_prefs_reader.h"
 
+#include "preferences.h"
+
 using namespace std;
 
@@ -36,6 +38,31 @@
 }
 
-bool CmdLinePrefsReader::callBack( ArgTableEntry entry, void * data, const std::string & arg, const std::vector< std::string > & argArgs )
+bool CmdLinePrefsReader::callBack( ArgTableEntry entry, void * data, const std::string & arg, const std::vector<MultiType> & argArgs )
 {
+  switch ( entry.id )
+  {
+    case ID_SET_INI:
+    {
+      std::string section = arg;
+      section.erase( 0, entry.longOption.length()+1 );
+      std::string key = section;
+      section.erase( section.find(".") );
+      key.erase( 0, key.find(".")+1 );
+      //PRINTF(0)("SECTION '%s', KEY '%s'\n", section.c_str(), key.c_str());
+      
+      if ( key == "" || section == "" || argArgs.size() != 1 )
+      {
+        PRINTF(1)("usage: --set-section.key=value\n");
+        return false;
+      }
+      
+      Preferences::getInstance()->setMultiType( section, key, argArgs[0], true );
+      break;
+    }
+    default:
+      assert(false);
+  }
+  
+  return true;
 }
 
@@ -43,4 +70,8 @@
 {
   CmdLineParser parser;
+  
+  parser.add( ID_SET_INI, "set-%", '\0', 1 );
+  
+  parser.parse( &callBack, NULL, argc, argv );
 }
 
Index: /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.h
===================================================================
--- /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.h	(revision 7242)
+++ /branches/preferences/src/lib/parser/preferences/cmd_line_prefs_reader.h	(revision 7243)
@@ -12,4 +12,9 @@
 #include "src/lib/parser/cmdline_parser/cmdline_parser.h"
 
+enum
+{
+  ID_SET_INI = 1
+};
+
 //! A class for reading commandline arguments into Preferences
 class CmdLinePrefsReader 
@@ -23,5 +28,5 @@
     
   private:
-    static bool callBack( ArgTableEntry entry, void* data, const std::string & arg, const std::vector<std::string> & argArgs );
+    static bool callBack( ArgTableEntry entry, void* data, const std::string & arg, const std::vector<MultiType> & argArgs );
 
 };
Index: /branches/preferences/src/lib/util/preferences.cc
===================================================================
--- /branches/preferences/src/lib/util/preferences.cc	(revision 7242)
+++ /branches/preferences/src/lib/util/preferences.cc	(revision 7243)
@@ -157,5 +157,5 @@
  * @param value value
  */
-void Preferences::setMultiType(const char* section, const char* name, MultiType& value, bool dontSetModified)
+void Preferences::setMultiType(const char* section, const char* name, const MultiType& value, bool dontSetModified)
 {
   std::list<prefSection>::iterator it = data.begin();
Index: /branches/preferences/src/lib/util/preferences.h
===================================================================
--- /branches/preferences/src/lib/util/preferences.h	(revision 7242)
+++ /branches/preferences/src/lib/util/preferences.h	(revision 7243)
@@ -41,5 +41,5 @@
    void setInt(const std::string& section, const std::string& name, int value, bool dontSetModified = false);
    void setFloat(const std::string& section, const std::string& name, float value, bool dontSetModified = false);
-   void setMultiType(const std::string& section, const std::string& name, MultiType& value, bool dontSetModified = false);
+   void setMultiType(const std::string& section, const std::string& name, const MultiType& value, bool dontSetModified = false);
 
    const std::string getString(const std::string& section, const std::string& name, const std::string& defaultValue);
Index: /branches/preferences/src/orxonox.cc
===================================================================
--- /branches/preferences/src/orxonox.cc	(revision 7242)
+++ /branches/preferences/src/orxonox.cc	(revision 7243)
@@ -406,4 +406,6 @@
   prefs.parse(argc, argv);
 
+ // assert(false);
+  
   int i;
   for(i = 1; i < argc; ++i)
