Register for your free account! | Forgot your password?

You last visited: Today at 05:42

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Quest problem

Discussion on Quest problem within the Metin2 Private Server forum part of the Metin2 category.

Closed Thread
 
Old   #1
 
SolWayne's Avatar
 
elite*gold: 30
Join Date: Feb 2015
Posts: 362
Received Thanks: 58
Quest problem

Also wilkommens quest ist es zeige mal die zeile,

PHP Code:
notice_all("Er/Sie ist im "..pc.get_empire()..") . 
Habe das eine zeile unter namen sagen gesetzt dann kommt

PHP Code:
Error occured on compile welcome.quest 

Ty und MfG.

SolWayne
SolWayne is offline  
Old 03/07/2015, 16:12   #2
wild wild son




 
Nick's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 5,996
Received Thanks: 3,391


Bitte die angepinnten Themen in Betracht ziehen. (closerequested)

lg
Nick is offline  
Old 03/07/2015, 16:19   #3
 
elite*gold: 54
Join Date: Jan 2013
Posts: 518
Received Thanks: 354
PHP Code:
notice_all"Er/Sie ist im "..pc.get_empire().."" 
Musst du aber mit if Abfragen machen, sonst kommt so etwas:
Er/Sie ist im 1

D.h.:
PHP Code:
local reich=pc.get_empire
if reich==1 then
   notice_all
"Er/Sie ist im blauen Reich"
elseif reich==2 then
   notice_all
"Er/Sie ist im roten Reich"
els... 
Immer so weiter.

Regards
Rextrus is offline  
Old 03/07/2015, 16:26   #4

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Quote:
Originally Posted by Dexteɾ View Post
PHP Code:
notice_all"Er/Sie ist im "..pc.get_empire().."" 
Musst du aber mit if Abfragen machen, sonst kommt so etwas:
Er/Sie ist im 1

D.h.:
PHP Code:
local reich=pc.get_empire
if reich==1 then
   notice_all
"Er/Sie ist im blauen Reich"
elseif reich==2 then
   notice_all
"Er/Sie ist im roten Reich"
els... 
Immer so weiter.

Regards
Muss man nicht



PHP Code:
notice_all(({"Er""Sie"})[pc.get_sex()+1].." ist im "..({"roten""gelben""blauen"})[pc.get_empire()].." Reich."


Der Fehler war übrigens ganz simpel
PHP Code:
.. 
sind in LUA wie in Python z.B. das "+". Man verbindet damit Variablen und Strings etc.

Du hast also hier einen String:
PHP Code:
"Er/Sie ist im " 
und verbindest diesen mit ".." mit einer Variable
PHP Code:
"Er/Sie ist im "..pc.get_empire() 
bis hierhin ist es auch richtig. Nun hast du aber nocheinmal ".." hinzugefügt und mit einem " einen weiteren String gestartet, diesen aber nicht wieder beendet.
PHP Code:
"Er/Sie ist im "..pc.get_empire()..
richtig wäre da
PHP Code:
"Er/Sie ist im "..pc.get_empire().."" 
weil der angefangene String auch beendet werden muss.
Wenn aber nach "pc.get_empire()" nichts mehr kommt, muss man den String garnicht erst anfangen:
PHP Code:
"Er/Sie ist im "..pc.get_empire() 
rollback is offline  
Thanks
3 Users
Closed Thread


Similar Threads Similar Threads
[Quest-PROBLEM]"Weiter"-Button, Quest schließt sich
02/01/2014 - Metin2 Private Server - 8 Replies
Servus Leute, ich habe folgendes Problem, meine "give_starter_set.quest" sieht wie folgt aus: quest give_starter_set begin state start begin when login begin say_title("Willkommen") say("Willkommen auf TEST")
Compile all quest without quest's files list // Kompilieren Sie alle Quest ohne Quest
07/17/2011 - Metin2 PServer Guides & Strategies - 3 Replies
ENGLISH Hello dear community, this is a very simple guide but at the same time useful. How to compile ALL quest in the folder "quest" without the files list in the file "locale_list"? Easy! Open the file "make" and replace the content of the file with this: for f in *.quest; do ./qc $f; done Oki. Now set the 0777 permission to the file. Finally open a SSH client and sign in. Write the command: cd /game_file_folder
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings



All times are GMT +1. The time now is 05:43.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.