Skocz do zawartości

Rekomendowane odpowiedzi

Opublikowano

GML
if distance_to_object(npcspeed) < 100

{

if czat.notedkeys="hi" or czat.notedkeys="hello"{

rozm_sirspd=get_string("Oh, hello dear "+string(imie_ch)+"! I will bless you. Only tell me: WHAT IS THE KINGs NAME?",0)

if rozm_sirspd="Lepatopanosfajstos"

{

get_string("Great! You are really better than me! You have been blessed. Hail Lepatopanosfajstos! Good bye.",0);

move_speed+=1 instance_destroy() else get_string("No, it is not! Ehh...",0);

}

}

}

 

Co w tym kodzie jest źle? Wywala mi błąd: "Unexpected symbol in expression". :(

Opublikowano

Naucz się formatować kod.

GML
if( distance_to_object( npcspeed ) < 100 )

{

if( czat.notedkeys == "hi" || czat.notedkeys == "hello" )

{

rozm_sirspd = get_string( "Oh, hello dear " + string( imie_ch ) + "! I will bless you. Only tell me: WHAT IS THE KINGs NAME?", 0 );

if( rozm_sirspd == "Lepatopanosfajstos" )

{

get_string( "Great! You are really better than me! You have been blessed. Hail Lepatopanosfajstos! Good bye.", 0 );

//???

//move_speed+=1 instance_destroy() else get_string("No, it is not! Ehh...",0);

//

}

}

}

Co robi to else? Chyba powinno być:
GML
if( distance_to_object( npcspeed ) < 100 )

{

if( czat.notedkeys == "hi" || czat.notedkeys == "hello" )

{

rozm_sirspd = get_string( "Oh, hello dear " + string( imie_ch ) + "! I will bless you. Only tell me: WHAT IS THE KINGs NAME?", 0 );

if( rozm_sirspd == "Lepatopanosfajstos" )

{

get_string( "Great! You are really better than me! You have been blessed. Hail Lepatopanosfajstos! Good bye.", 0 );

move_speed += 1;

instance_destroy();

}

else

get_string( "No, it is not! Ehh...", 0 );

}

}

Opublikowano

Jest:

GML
move_speed+=1 instance_destroy() else get_string("No, it is not! Ehh...",0);
Pytam się raz jeszcze, czego tyczy się to else?
Opublikowano
Jest:
GML
move_speed+=1 instance_destroy() else get_string("No, it is not! Ehh...",0);
Pytam się raz jeszcze, czego tyczy się to else?

if rozm_sirspd... O, już działa ;p

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...