Temat:
Nie mogę skompilować skryptu (Oczekiwanie 4 parametrow)
|
Napisano dnia: 2013-06-22 20:27:23
Racja, nie zauważyłem jeszcze dwóch przecinków, skompilowało się dobrze, teraz ją przetestuję.
Hmm, mówisz że skacze od razu do misji zaliczonej, to dlatego że na razie chciałem testować te funkcje, które się znajdują w misji, potem jak zadziała dobrze będę ją uzupełniał dalej.
Hmm starter już działa ale crash mam po wejściu w marker
STARTER.cs
MISJA1.cm
Dobra, to teraz tak, wchodze w starter i od razu pojawia się misja zaliczona, cały czas daje mi 5000 tysiaków i cały czas pętla się powtarza, dlaczego tak się dzieje?
Hmm, mówisz że skacze od razu do misji zaliczonej, to dlatego że na razie chciałem testować te funkcje, które się znajdują w misji, potem jak zadziała dobrze będę ją uzupełniał dalej.
Hmm starter już działa ale crash mam po wejściu w marker
STARTER.cs
Kod:
{$CLEO .cs}
0000: NOP
while true
wait 0
:NONAME_1
wait 0
$MARKER = Marker.CreateIconAndSphere(58, 2157.3542, -1613.5286, 14.227)
if
00ED: actor $PLAYER_ACTOR sphere 1 near_point 2157.3542 -1613.5286 14.227 radius 4.0 4.0 on_foot
then
0164: disable_marker $MARKER
0A94: start_custom_mission "missionsMISJA1"
wait 10000
break
jf @NONAME_1
end
end
0000: NOP
while true
wait 0
:NONAME_1
wait 0
$MARKER = Marker.CreateIconAndSphere(58, 2157.3542, -1613.5286, 14.227)
if
00ED: actor $PLAYER_ACTOR sphere 1 near_point 2157.3542 -1613.5286 14.227 radius 4.0 4.0 on_foot
then
0164: disable_marker $MARKER
0A94: start_custom_mission "missionsMISJA1"
wait 10000
break
jf @NONAME_1
end
end
MISJA1.cm
Kod:
{$CLEO .cm}
:Mission
0050: gosub @Mission_Start
if
0112: wasted_or_busted // mission only
then
0050: gosub @Misja_Nieudana
end
0050: gosub @Mission_Cleanup
end_thread
:Mission_Start
wait 0
thread 'MISJA1'
$ONMISSION = 1
Player.Defined($PLAYER_CHAR)
// kod całej misji
:PETLA
wait 0
00A1: put_actor $PLAYER_CHAR at 2158.1287 -1611.4713 14.3511
0173: set_actor $PLAYER_CHAR Z_angle_to 341.6792
jf @PETLA
:PETLA1
wait 0
02A3: enable_widescreen 1
Player.CanMove($PLAYER_CHAR) = False
015F: set_camera_position 2158.3647 -1620.4388 17.2313 rotation 0.0 0.0 0.0
05BC: AS_actor $PLAYER_ACTOR FIGHTC_3 1
return
:Mission_Cleanup
wait 0
00D8: mission_cleanup
$ONMISSION = 0
return
:Misja_Nieudana
wait 0
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
mission_cleanup
end_thread
return
:Misja_Zaliczona
wait 0
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1
0109: player $PLAYER_CHAR money += 50
0394: play_music 2
mission_cleanup
end_thread
return
:Mission
0050: gosub @Mission_Start
if
0112: wasted_or_busted // mission only
then
0050: gosub @Misja_Nieudana
end
0050: gosub @Mission_Cleanup
end_thread
:Mission_Start
wait 0
thread 'MISJA1'
$ONMISSION = 1
Player.Defined($PLAYER_CHAR)
// kod całej misji
:PETLA
wait 0
00A1: put_actor $PLAYER_CHAR at 2158.1287 -1611.4713 14.3511
0173: set_actor $PLAYER_CHAR Z_angle_to 341.6792
jf @PETLA
:PETLA1
wait 0
02A3: enable_widescreen 1
Player.CanMove($PLAYER_CHAR) = False
015F: set_camera_position 2158.3647 -1620.4388 17.2313 rotation 0.0 0.0 0.0
05BC: AS_actor $PLAYER_ACTOR FIGHTC_3 1
return
:Mission_Cleanup
wait 0
00D8: mission_cleanup
$ONMISSION = 0
return
:Misja_Nieudana
wait 0
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
mission_cleanup
end_thread
return
:Misja_Zaliczona
wait 0
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1
0109: player $PLAYER_CHAR money += 50
0394: play_music 2
mission_cleanup
end_thread
return
Dobra, to teraz tak, wchodze w starter i od razu pojawia się misja zaliczona, cały czas daje mi 5000 tysiaków i cały czas pętla się powtarza, dlaczego tak się dzieje?
Kod:
{$CLEO .cm}
:Mission
0050: gosub @Mission_Start
if
0112: wasted_or_busted // mission only
then
0050: gosub @Misja_Nieudana
end
0050: gosub @Mission_Cleanup
end_thread
:Mission_Start
wait 0
thread 'MISJA1'
$ONMISSION = 1
Player.Defined($PLAYER_CHAR)
// kod całej misji
:PETLA
wait 0
02A3: enable_widescreen 1
Player.CanMove($PLAYER_CHAR) = False
015F: set_camera_position 2158.3647 -1620.4388 17.2313 rotation 0.0 0.0 0.0
05BC: AS_actor $PLAYER_ACTOR FIGHTC_3 1
JUMP @Misja_Zaliczona
:Mission_Cleanup
wait 0
00D8: mission_cleanup
$ONMISSION = 0
return
:Misja_Nieudana
wait 0
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
mission_cleanup
end_thread
return
:Misja_Zaliczona
wait 0
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1
0109: player $PLAYER_CHAR money += 50
0394: play_music 2
$ONMISSION = 0
mission_cleanup
end_thread
:Mission
0050: gosub @Mission_Start
if
0112: wasted_or_busted // mission only
then
0050: gosub @Misja_Nieudana
end
0050: gosub @Mission_Cleanup
end_thread
:Mission_Start
wait 0
thread 'MISJA1'
$ONMISSION = 1
Player.Defined($PLAYER_CHAR)
// kod całej misji
:PETLA
wait 0
02A3: enable_widescreen 1
Player.CanMove($PLAYER_CHAR) = False
015F: set_camera_position 2158.3647 -1620.4388 17.2313 rotation 0.0 0.0 0.0
05BC: AS_actor $PLAYER_ACTOR FIGHTC_3 1
JUMP @Misja_Zaliczona
:Mission_Cleanup
wait 0
00D8: mission_cleanup
$ONMISSION = 0
return
:Misja_Nieudana
wait 0
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1
mission_cleanup
end_thread
return
:Misja_Zaliczona
wait 0
01E3: show_text_1number_styled GXT 'M_PASS' number 5000 time 5000 style 1
0109: player $PLAYER_CHAR money += 50
0394: play_music 2
$ONMISSION = 0
mission_cleanup
end_thread
___________________
http://dawidsaworski.blogspot.com/
:)