sxriter Posted November 17, 2018 Share Posted November 17, 2018 Hello, today i was thinking about this, and try to investigate my self in the .ini files and see what i can do I explain now: I made a Mission in cleo (mission.cs and mission.cm) the .cm works very good. without errors. But i think on more missions, and make use of a .ini file, that store the player progress if the mission is completed or not. This is the .ini file Quote [MISSION1] MISSION_PASSED=1 <- 1 mission passed [MISSION2] MISSION_PASSED=0 <- 0 mission available [MISSION3] MISSION_PASSED=-1 <- -1 mission locked. [MISS.... The values are changed every mission finished. That works, i finish the mission, look in the .ini file and values changes. Everything looks perfect, but... When i finish the mission, the game doesn't destroy the marker. I cant do the rest of the code. This is the code. Quote {$CLEO .cs} :MISSION_1 03A4: name_thread 'MISSION1' :MISSION_2 $X_JOHNSON_HOUSE = 2495.3274 $Y_JOHNSON_HOUSE = -1686.9609 $Z_JOHNSON_HOUSE = 13.515 $1 = Marker.CreateIconAndSphere (15, $X_JOHNSON_HOUSE, $Y_JOHNSON_HOUSE, $Z_JOHNSON_HOUSE) 0AF0: read_int_from_ini_file "cleo\samissions.ini" section "MISSION1" key "MISSION_PASSED" store_to [email protected] :MISSION_3 0001: wait 0 ms 00D6: if 0 0256: player $PLAYER_CHAR defined 004D: jump_if_false @MISSION_3 00D6: if 0 0038: $ONMISSION == 0 004D: jump_if_false @MISSION_3 00D6: if 0006: [email protected] = 1 004D: jump_if_false @MISSION_7 0002: jump @MISSIONE_5 :MISSION_7 00D6: if 00FF: actor $PLAYER_ACTOR sphere 0 in_sphere $X_JOHNSON_HOUSE $Y_JOHNSON_HOUSE $Z_JOHNSON_HOUSE radius 1.0 1.0 2.0 on_foot 004D: jump_if_false @MISSION_3 0002: jump @MISSION_4 :MISSION_4 00BA: text_styled 'BSMKM1' 1000 ms 2 0004: $ONMISSION = 1 // integer values Player.CanMove($PLAYER_CHAR, false) fade 0 500 repeat wait 0 until 816B: not fading 0A94: start_custom_mission "BSMOKEM" // Player.CanMove($PLAYER_CHAR, true) fade 1 500 repeat wait 0 until 816B: not fading jump @MISSION_3 //<-----------------works perfect!!!! :MISSION_5 wait 5000 Marker.Disable($1) I'm thinking that Quote 0AF0: read_int_from_ini_file "cleo\samissions.ini" section "MISSION1" key "MISSION_PASSED" store_to [email protected] is the problem. And i don't know how to solve it. Or maybe there is another problem and i didnt, know. Please Help Also Last Question Quote 0006: [email protected] = 1 004D: jump_if_false @MISSION_7 0002: jump @MISSIONE_5 Im thinking of change this to something like this , i dont know if this would work. or if this exist. Quote {$CLEO .cs} :MISSION_1 //example xD 03A4: name_thread 'MISSION1' :MISSION_2 $X_JOHNSON_HOUSE = 2492.3274 $Y_JOHNSON_HOUSE = -1682.9609 $Z_JOHNSON_HOUSE = 13.515 0AF0: read_int_from_ini_file "cleo\samissions.ini" section "MISSION1" key "MISSION_PASSED" store_to [email protected] if and 0006: [email protected] = 0 004D: jump_if_false @MISSION_6 jump @MISSION_5 :MISSION_5 $1 = Marker.CreateIconAndSphere (16, $X_JOHNSON_HOUSE, $Y_JOHNSON_HOUSE, $Z_JOHNSON_HOUSE) :MISSION_6 if and 0006: [email protected] = -1 004D: jump_if_false @MISSION_8 jump @MISSION_7 :MISSION_7 $1 = Marker.CreateIconAndSphere (17, $X_JOHNSON_HOUSE, $Y_JOHNSON_HOUSE, $Z_JOHNSON_HOUSE) :MISSION_8 if and 0006: [email protected] = 1 004D: jump_if_false @MISSION_2 jump @MISSION_9 :MISSION_9 $1 = Marker.CreateIconAndSphere (19, $X_JOHNSON_HOUSE, $Y_JOHNSON_HOUSE, $Z_JOHNSON_HOUSE) I need three values one for mission locked, one for mission available, and one for mission finished. THANKS Link to comment Share on other sites More sharing options...
In45do Posted November 17, 2018 Share Posted November 17, 2018 (edited) Replace opcode 0006 with 0038(for global variable) or 0039(for local variable). Also I recommend to not use global variables in cleo script. Edited November 17, 2018 by In45do Link to comment Share on other sites More sharing options...
sxriter Posted November 17, 2018 Author Share Posted November 17, 2018 27 minutes ago, In45do said: Replace opcode 0006 with 0038. Also don't use global variables in cleo script. Didnt work Link to comment Share on other sites More sharing options...
sxriter Posted November 17, 2018 Author Share Posted November 17, 2018 (edited) 1 hour ago, In45do said: Replace opcode 0006 with 0038(for global variable) or 0039(for local variable). Also I recommend to not use global variables in cleo script. SORRY YES IT WORKS OMG I LOVE YOU... xD thank you! Edited November 17, 2018 by sxriter it works xD Link to comment Share on other sites More sharing options...