Dark_Raver Posted August 28, 2006 Share Posted August 28, 2006 i am trying to get it so that the entrys of the combo box ar readed trough a ini file, this is what i have: write ini code: IniWrite("dr_cmaps.ini","maps","map1","mm_smallbox") IniWrite("dr_cmaps.ini","maps","map2","mm_bigbox") IniWrite("dr_cmaps.ini","maps","map3","mm_tower") IniWrite("dr_cmaps.ini","maps","map4","mm_thearena_beta1") oÝ÷ Ú·v)âr^jëh×6 $map1 = IniRead("dr_cmaps","maps","map1","no map entry found") $map1 = IniRead("dr_cmaps","maps","map1","no map entry found") $map2 = IniRead("dr_cmaps","maps","map2","no map entry found") $map3 = IniRead("dr_cmaps","maps","map3","no map entry found") $map4 = IniRead("dr_cmaps","maps","map4","no map entry found") oÝ÷ Ù§]¶(º¡×ºÚ"µÍÕRPÝÛÛXÐYÝ[È ÌÍØÛÛX×ÛX ÌÍÛXJ ini file contents: [maps] map1=mm_smallbox map2=mm_bigbox map3=mm_tower map4=mm_thearena_beta1 i keep getting the default error message (no map entry found). what am i doing wrong? allso if this works i need that the selected variabel to be used in a command line parrameter do i just need to use this: Run("mm.exe +map $map1") or does it needs to be done in a different way? thnx in advance Link to comment Share on other sites More sharing options...
micor Posted August 28, 2006 Share Posted August 28, 2006 (edited) $map1 = IniRead("dr_cmaps","maps","map1","no map entry found") should probably be $map1 = IniRead("dr_cmaps.ini","maps","map1","no map entry found") The other problem: $runcmd = "mm.exe +map " & $map1 run($runcmd) Edited August 28, 2006 by micor Link to comment Share on other sites More sharing options...
Dark_Raver Posted August 28, 2006 Author Share Posted August 28, 2006 ok that worked but i forgot to ask some things :$ 1. the combo box should output $mappar wich is +map $map1 how should i do this? 2. multiple command line parrameters should be $runcmd = "mm.exe +map " & $par1 & par2 &par... ? Link to comment Share on other sites More sharing options...
micor Posted August 28, 2006 Share Posted August 28, 2006 You kind of lost me on 1. 2. You just have to put spaces between the arguments otherwiseitwouldallbewrittentogether. I personally prefer$runcmd = "mm.exe +map " & $par1 & " " & $par2 & " " & $parxbut I guess$runcmd = "mm.exe +map $par1 $par2 $parx"would work too... Link to comment Share on other sites More sharing options...
Dark_Raver Posted August 28, 2006 Author Share Posted August 28, 2006 ok il try that about the first thing: when i select a map form the combo box i get the variable $map1 but i want to get so i get $mappar, wich is actualy +map $map1 so: $map1: the selected map $mappar: the command line parrameter +map with the selected map behind it (so you get +map $map1) get it? otherwise il try to explain it in a different way Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now