Page 1 of 1

LUA Crash

Posted: Mon Dec 19, 2016 9:01 pm
by Gangrenous
Found a nice little thing. Accidentally doing this...

Code: Select all

StartConversation(conversation, NPC, Spawn, "Hello! It's such a pleasure to talk to someone else for a change! What brings you this way from the big city, eh?")
AddConversationOption(conversation, "Glad to brighten your day. Just passing through.", "")
Instead of...

Code: Select all

AddConversationOption(conversation, "Glad to brighten your day. Just passing through.", "")
StartConversation(conversation, NPC, Spawn, "Hello! It's such a pleasure to talk to someone else for a change! What brings you this way from the big city, eh?")
Can cause a nice strange crash

Re: LUA Crash

Posted: Mon Dec 19, 2016 10:09 pm
by Jabantiz
Once you call start conversation the conversation variable is no longer valid so calling add conversation option after will crash. Start conversation always needs to be the last function called as it pushes every thing to the client.

Re: LUA Crash

Posted: Tue Dec 20, 2016 6:09 am
by Gangrenous
I was just wanting to notate it. It is a means for a quest writer to completely crash the server. You could imagine if a live server was running with players and someone messed up a quest.