Coding

 Reply to this postStart new topic

[CLEO3] script freezes

Siggi
post Aug 18 2010, 07:36 AM
Post #1


User banned by request due to personal reasons. - SV

Posts: 24
From: 0xFFFFFFFF
Joined: 14-March 10



Hi all,

I made a little script for testing a combination of arrays and for-loops but when I press NUMPAD 0 and NUMPAD 1 the game freezes right after it shows the text box


SANNY
{$CLEO}

thread 'SUPPORT'
0662: "by The_Siggi"
0662: "High-level example - "
0662: "No4: create actor"
0662: "Tue. 17th August 2010"
:MAIN
while true
    wait 20
    if
    0256:   player $PLAYER_CHAR defined
      then
        if
        03EE:   player $PLAYER_CHAR controllable
          then
            if and
            0038: $ONMISSION == 0
            80DF:   not actor $PLAYER_ACTOR driving
            84AD:   not actor $PLAYER_ACTOR in_water
            8818:   not actor $PLAYER_ACTOR in_air
              then
                if and
                0AB0:  key_pressed 0x60
                0AB0:  key_pressed 0x61
                  then
                    show_text_box 'CHEAT3'
                    Model.Load(#FAM1)
                    Model.Load(#FAM2)
                    Model.Load(#FAM3)
                    Model.Load(#AK47)
                    Model.Load(#TEC9)
                    Model.Load(#SNIPER)
                    Model.Load(#SHOTGSPA)
                    023C: load_special_actor 'SWEET' as 1 // models 290-299
                    023C: load_special_actor 'SMOKEV' as 2 // models 290-299
                    023C: load_special_actor 'RYDER1' as 3 // models 290-299
                    0@ = 0
                    while true
                        wait 0
                        if and
                        Model.Available(#AK47)
                        Model.Available(#TEC9)
                        Model.Available(#SNIPER)
                        Model.Available(#SHOTGSPA)
                          then
                            if and
                            Model.Available(#FAM1)
                            Model.Available(#FAM2)
                            Model.Available(#FAM3)
                              then
                                if and                              
                                023D:   special_actor 1 loaded
                                023D:   special_actor 2 loaded
                                023D:   special_actor 3 loaded
                                  then
                                    0@ = 1
                                    break
                                end
                            end
                        end
                    end
                    //07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
                    Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
                    Inc(1@, 3.0)
                    Dec(2@, 2.0)
                    02CE: 3@ = ground_z_at 1@ 2@ 3@
                    Actor.Create(10@, 8, #FAM1, 1@, 2@, 3@)
                    Inc(2@, 1.0)
                    02CE: 3@ = ground_z_at 1@ 2@ 3@
                    Actor.Create(11@, 8, #FAM2, 1@, 2@, 3@)
                    Inc(2@, 1.0)
                    02CE: 3@ = ground_z_at 1@ 2@ 3@
                    Actor.Create(12@, 8, #FAM2, 1@, 2@, 3@)
                    Inc(2@, 1.0)
                    02CE: 3@ = ground_z_at 1@ 2@ 3@
                    Actor.Create(13@, 8, #FAM3, 1@, 2@, 3@)
                    Inc(2@, 1.0)
                    02CE: 3@ = ground_z_at 1@ 2@ 3@
                    Actor.Create(14@, 8, #SPECIAL01, 1@, 2@, 3@)
                    Inc(2@, 1.0)
                    02CE: 3@ = ground_z_at 1@ 2@ 3@
                    Actor.Create(15@, 8, #SPECIAL02, 1@, 2@, 3@)
                    Inc(2@, 1.0)
                    02CE: 3@ = ground_z_at 1@ 2@ 3@
                    Actor.Create(16@, 8, #SPECIAL03, 1@, 2@, 3@)                                        
                    for 17@ = 0 to 6
                        wait 0
                        0223: set_actor 10@(17@,6i) health_to 5000
                        04D8: set_actor 10@(17@,6i) drowns_in_water FALSE
                        0446: set_actor 10@(17@,6i) prone_to_headshots FALSE
                        0946: set_actor 10@(17@,6i) actions_uninterupted_by_weapon_fire TRUE
                        01B2: give_actor 10@(17@,6i) weapon 32 ammo 99999 // Load the weapon model before using this
                        //0631: put_actor 10@(17@,6i) in_group $PLAYER_GROUP  
                    end
                    01B2: give_actor 10@ weapon 27 ammo 99999 // Load the weapon model before using this
                    01B2: give_actor 11@ weapon 30 ammo 99999 // Load the weapon model before using this
                    01B2: give_actor 12@ weapon 30 ammo 99999 // Load the weapon model before using this
                    01B2: give_actor 13@ weapon 30 ammo 99999 // Load the weapon model before using this
                    01B2: give_actor 14@ weapon 27 ammo 99999 // Load the weapon model before using this
                    01B2: give_actor 15@ weapon 34 ammo 99999 // Load the weapon model before using this
                    01B2: give_actor 16@ weapon 30 ammo 99999 // Load the weapon model before using this
                    0@ = 2
                    Model.Destroy(#FAM1)
                    Model.Destroy(#FAM2)
                    Model.Destroy(#FAM3)
                    Model.Destroy(#AK47)
                    Model.Destroy(#TEC9)
                    Model.Destroy(#SNIPER)
                    Model.Destroy(#SHOTGSPA)
                    0296: unload_special_actor 1
                    0296: unload_special_actor 2
                    0296: unload_special_actor 3
                    {
                    while true
                        wait 20
                        if or
                        8256:   not player $PLAYER_CHAR defined
                        856D:   not actor $PLAYER_ACTOR defined
                          then
                            break
                        end
                        if and
                        80F2:   not actor 10@ near_actor $PLAYER_ACTOR radius 100.0 100.0 0
                        80F2:   not actor 11@ near_actor $PLAYER_ACTOR radius 100.0 100.0 0
                        80F2:   not actor 12@ near_actor $PLAYER_ACTOR radius 100.0 100.0 0
                        80F2:   not actor 13@ near_actor $PLAYER_ACTOR radius 100.0 100.0 0
                        80F2:   not actor 14@ near_actor $PLAYER_ACTOR radius 100.0 100.0 0
                        80F2:   not actor 15@ near_actor $PLAYER_ACTOR radius 100.0 100.0 0
                        80F2:   not actor 16@ near_actor $PLAYER_ACTOR radius 100.0 100.0 0
                          then
                            break
                        end
                        if or
                        Actor.Dead(10@)
                        Actor.Dead(11@)
                        Actor.Dead(12@)
                        Actor.Dead(13@)
                        Actor.Dead(14@)
                        Actor.Dead(15@)
                        Actor.Dead(16@)
                          then
                            break
                        end
                    end
                    }

                    Actor.RemoveReferences(10@)
                    Actor.RemoveReferences(11@)
                    Actor.RemoveReferences(12@)
                    Actor.RemoveReferences(13@)
                    Actor.RemoveReferences(14@)
                    Actor.RemoveReferences(15@)
                    Actor.RemoveReferences(16@)
                    wait 2000
                    continue
                end
            end
        end
    end
end


I hope someone can help me to fix this

cheers

This post has been edited by Siggi: Aug 18 2010, 07:37 AM


--------------------


User banned by request due to personal reasons. - SV
Go to the top of the page
 
+Quote Post
Silent
post Aug 18 2010, 11:51 AM
Post #2


The master of cut retort

Group Icon

Posts: 239
From: Warsaw, PL
Joined: 21-July 10



SANNY
                    023C: load_special_actor 'RYDER1' as 3 // models 290-299


I think that game crashes here. Try to replace 'RYDER1' to 'RYDER'.
Go to the top of the page
 
+Quote Post
Siggi
post Aug 18 2010, 12:46 PM
Post #3


User banned by request due to personal reasons. - SV

Posts: 24
From: 0xFFFFFFFF
Joined: 14-March 10



yeah it should be 'RYDER2'. 'Ryder1' seems to be unesed
thanx (lol embarrissing error)


--------------------


User banned by request due to personal reasons. - SV
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: