Jump to content

[LUA]DEFINE function


Go to solution Solved by Sanchez,

Recommended Posts

  • Premium

Hi all,

 

Since i am a very curious programer,  the day i was able to programing in C++ , i checked all the differences between C++ and LUA.

 

Recently in those months, i've checked YMIR's locale, and i saw something quests adding DEFINE functions before the quest start.

 

DEFINE functions can be used as a global variable, it's very, very useful.

 

The question is: Why when i recall DEFINE function in a quest it gives me error-output of the quest-compiler?

 

Script:

DEFINE NPC 20091
quest test begin
state start begin
when NPC.chat."Test" begin
say_title(mob_name(NPC))
say("It should work properly.")
end
end
end

 

QC error:

Err: must start with quest

Sorry for the script indentation, forum doesn't indent my script :/

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

  • Premium

You have to use pre_qc.py, because qc can't handle it.

 

I see.. thanks bro.

 

 

#Closerequest

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.