Script block. Show Alert with SetQuestEntryState

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
flyingv
Posts: 11
Joined: Wed Apr 10, 2024 4:03 am

Script block. Show Alert with SetQuestEntryState

Post by flyingv »

Hi!

I've notice that alert popup is not showing with this lines of Lua code:

Code: Select all

SetQuestEntryState("Enemy Attack", 1, "active");
Variable["Alert"] = "New Text"
Throw exception 'Code has syntax error'

When I use

Code: Select all

SetQuestState("Enemy Attack", "active");
Variable["Alert"] = "New Text"
All goes fine. Alert is shown. Why I can't use it together with SetQuestEntryState?
Attachments
Screenshot 2024-07-15 at 18.10.08.png
Screenshot 2024-07-15 at 18.10.08.png (55.71 KiB) Viewed 250 times
Screenshot 2024-07-15 at 20.10.53.png
Screenshot 2024-07-15 at 20.10.53.png (56.39 KiB) Viewed 250 times
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Script block. Show Alert with SetQuestEntryState

Post by Tony Li »

Hi,

Does this Script work by itself?

Code: Select all

SetQuestEntryState("Billy's Debt", 1, "active")
If not, please try retyping it. Maybe one of the quote characters is the wrong type of quote, or maybe there's an invisible character that's invalid.
flyingv
Posts: 11
Joined: Wed Apr 10, 2024 4:03 am

Re: Script block. Show Alert with SetQuestEntryState

Post by flyingv »

A weird situation, but I think you were right. When I retyped all the scripts, it started work.

Thanks!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Script block. Show Alert with SetQuestEntryState

Post by Tony Li »

Glad to help!
Post Reply