Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   NASC Help (https://postpacific.loc-online.com/showthread.php?t=3884)

Eanae 02.04.2006 15:55

NASC Help
 
For some reason, when i run nasc the "macro functions don't work, so i hand copied it into this:

Code:

        EventHandler QUEST_ACCEPTED(quest_id, talker)
        {

                        /*
                                ask to get his sword breaker for him
                        */
                        if ( quest_id==45)
                        {
                        talker.quest_last_reward_time = 0;
                        SetMemo(talker, 45);
                        SoundEffect(talker, "ItemSound.quest_accept");
                        ShowPage(talker, "pet_manager_cooper_q045_02.htm");
                        SetMemoState(talker, @help_my_sister, 1);
                        talker.flag = 0;
                }
                                return;
                        }

                super;

        }

Does anything look wrong with this? It doesn't work with the html quest accepting function. Any help would be appretiated. :(

Larson 02.04.2006 16:52

Re: NASC Help
 
Quote:

Originally Posted by Eanae
Does anything look wrong with this? It doesn't work with the html quest accepting function. Any help would be appretiated. :(

1. In the given example a superfluous bracket '}'. Must be:
Code:

EventHandler QUEST_ACCEPTED(quest_id, talker)
{
        if (quest_id==45)
        {
                talker.quest_last_reward_time = 0;
                SetMemo(talker, 45);
                SoundEffect(talker, "ItemSound.quest_accept");
                ShowPage(talker, "pet_manager_cooper_q045_02.htm");
                SetMemoState(talker, @help_my_sister, 1);
                talker.flag = 0;
                return;
        }
        super;
}


2. Check up correctness of transfer quest_id through a HTML-file

From itself: in this handle be not too lazy to enter check of parameters of reception quest - MemoCount, HaveMemo. It will save up you from holes in the future...


All times are GMT. The time now is 15:49.