yair1221 Posted August 11, 2010 Share Posted August 11, 2010 Why doesnt multiple threading works with my main.scm? im creating a few loop threads but they wont work, only the MAIN thread works, and it is a loop too Link to comment Share on other sites More sharing options...
Jerry123 Posted August 11, 2010 Share Posted August 11, 2010 Do you created the Threads with create_thread ? Link to comment Share on other sites More sharing options...
BnB Posted August 11, 2010 Share Posted August 11, 2010 (edited) First make sure you have the original v1 us main.scm. And I think if you were right create thread command would not exist. Edited August 11, 2010 by BnB Link to comment Share on other sites More sharing options...
yair1221 Posted August 11, 2010 Author Share Posted August 11, 2010 Do you created the Threads with create_thread ? no i use thread 'NAME' Link to comment Share on other sites More sharing options...
Jerry123 Posted August 11, 2010 Share Posted August 11, 2010 Do you created the Threads with create_thread ? no i use thread 'NAME' I mean not in the thread. In the MAIN thread! There should be a couple of "create_thread" Codes in the Script that makes your threads to start exept Missions and External Scripts! Link to comment Share on other sites More sharing options...
james227uk Posted August 11, 2010 Share Posted August 11, 2010 create_thread and thread 'DDD' Are different things. create_thread makes the thread, and tells the engine where the thread is thread 'DDD' names the thread Link to comment Share on other sites More sharing options...
yair1221 Posted August 11, 2010 Author Share Posted August 11, 2010 ohhhh so it should be create_threadthread 'NAME' Link to comment Share on other sites More sharing options...
Jerry123 Posted August 11, 2010 Share Posted August 11, 2010 ohhhhso it should be create_threadthread 'NAME' No in the Main Thread use the create thread command and in the created thread name thread EXAMPLE: :MAIN004F: create_thread @MASTER004F: create_thread @R3 004F: create_thread @SPEEDOMETR_BYHARD_V2 004F: create_thread @GYM 004F: create_thread @SHOOT 004F: create_thread @BLOODR 004F: create_thread @HOTR 004F: create_thread @KICKS 004F: create_thread @PSAVE1 004F: create_thread @FLOW 004F: create_thread @HELP 004F: create_thread @COLLS 004F: create_thread @CRANES 004F: create_thread @BUY_PRO 004F: create_thread @VALET_L 004F: create_thread @ADPLANE 004F: create_thread @TRAINSL 004F: create_thread @IMPND_L 004F: create_thread @OPENUP 004F: create_thread @TRI 004F: create_thread @PROJECT 004F: create_thread @BBCHAL 004F: create_thread @NONAME_7 004F: create_thread @NONAME_8 004F: create_thread @NONAME_9 004F: create_thread @IMPEXPM 004F: create_thread @GFINIT 004F: create_thread @NONAME_10 004F: create_thread @A_CONT 004F: create_thread @BSCHOO 004F: create_thread @BIKES 004F: create_thread @NONAME_5 004F: create_thread @TLP :RULLET03A4: name_thread "RULLET" 0001: wait 0 ms 0002: jump @RULLET_21 Link to comment Share on other sites More sharing options...
james227uk Posted August 11, 2010 Share Posted August 11, 2010 By default, Sanny Builder includes this stripped main.scm script, it makes it clear where things go { use macro (Ctrl+J) "headsa" to insert a file header }{$VERSION 3.0.0000}var$PLAYER_CHAR: Playerend // var 03A4: name_thread 'MAIN' 01F0: set_max_wanted_level_to 6 0111: toggle_wasted_busted_check 0 00C0: set_current_time_hours_to 8 minutes_to 0 04E4: unknown_refresh_game_renderer_at 2488.56 -1666.84 03CB: set_rendering_origin_at 2488.56 -1666.84 13.38 0053: $PLAYER_CHAR = create_player #NULL at 2488.56 -1666.84 13.38 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 0373: set_camera_directly_behind_player 01B6: set_weather 0 0001: wait 0 ms 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0 070D: rebuild_player $PLAYER_CHAR 01B4: toggle_player $PLAYER_CHAR can_move 1 016A: fade 1 time 0 04BB: select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 0004: $DEFAULT_WAIT_TIME = 25003E6: remove_text_box // put your create_thread commands here:MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes0002: jump @MAIN_LOOP // put your mods (threads) here//-------------Mission 0---------------// put your missions here//-------------External script 0---------------// put your external scripts here Link to comment Share on other sites More sharing options...
yair1221 Posted August 11, 2010 Author Share Posted August 11, 2010 thanks! I finally understood that 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