Ghost Opublikowano 3 Maja 2009 Opublikowano 3 Maja 2009 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". :(
Tymon Opublikowano 3 Maja 2009 Opublikowano 3 Maja 2009 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 ); } }
XxMichałxX Opublikowano 3 Maja 2009 Opublikowano 3 Maja 2009 to, że masz w jednej linijce dwie funkcje: move_speed+=1 instance_destroy() rozdziel to chociażby enterem
Tymon Opublikowano 3 Maja 2009 Opublikowano 3 Maja 2009 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?
Ghost Opublikowano 3 Maja 2009 Autor Opublikowano 3 Maja 2009 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
Rekomendowane odpowiedzi
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ę