GDialog::Error Grabbing text message!

Horusxav

Newbie modder
Modder
Hi, i've got a problem with a script. I modified : FSFACE.SSL
I renamed it, added a new entry in SCRIPTS.H and SCRIPTS.LST, modified it
Then i took FSFACE.MSG, renamed and modified it
After that i associated the MSG and compiled using sfall compiler
The new.msg :
Code:
{100}{}{A computer}
{101}{}{Your medical computer}
{102}{}{Welcome. I am your medical computer. Are you in need of medical assistance?}
{103}{}{Yes.}
{104}{}{No.}
{105}{}{Please state your medical need.}
{106}{}{Me hurt.}
{107}{}{Me poisoned.}
{108}{}{Me glow in dark.}
{109}{}{Me gimp.}
{110}{}{Not need anything.}
{111}{}{I'm hurt.}
{112}{}{I'm poisoned. I need an antidote.}
{113}{}{I took a good dose of radiation.}
{114}{}{I'm crippled.}
{115}{}{I don't really need anything at this time.}
{116}{}{One moment please while I configure the autodoc... The healing process will require 5 minutes time.}
{117}{}{Okay.}
{118}{}{Never mind.}
{119}{}{All right.}
{120}{}{Forget it.}
{121}{}{One moment please while I configure the autodoc... The poison will first be analyzed and then an antidote will be synthesized. Tissue damage will then be repaired. This process will require 30 minutes.}
{122}{}{Ok.}
{123}{}{No.}
{124}{}{Sure.}
{125}{}{Never mind.}
{126}{}{One moment please while I configure the autodoc... Anti-radiation compounds will be administered and then tissue damage will be repaired. This process will require 60 minutes.}
{127}{}{Ok.}
{128}{}{No.}
{129}{}{Fine.}
{130}{}{I changed my mind.}
{131}{}{One moment please while I configure the autodoc... Restructuring of impaired limbs requires 24 hours.}
{132}{}{Ok.}
{133}{}{No.}
{134}{}{Let's do it.}
{135}{}{Maybe later.}
{136}{}{The requested procedure has been completed. Goodbye.}
{137}{}{Thanks.}

The new .SSL :
Code:
/* Include Files */
#include "..\headers\define.h"


#define NAME                    SCRIPT_ZDCTR
#define CUR_COMP_SCRIPT         SCRIPT_ZDCTR


#include "..\headers\command.h"
#include "..\headers\sanfran.h"


/* Standard Script Procedures */
procedure start;
procedure use_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure use_obj_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;
procedure map_update_p_proc;
procedure talk_p_proc;


/*****************************************************************
   Local Variables which are saved. All Local Variables need to be
   prepended by LVAR_
*****************************************************************/
#define LVAR_Herebefore                          (0)
#define LVAR_Bit_Adjust                          (1)
#define LVAR_Bit_Discs                           (2)


#define adjust(x)     (lvar_bit(LVAR_Bit_Adjust, x))
#define set_adjust(x) set_lvar_bit_on(LVAR_Bit_Adjust, x)


//Uses same bits above
#define disc(x)       (lvar_bit(LVAR_Bit_Discs, x))
#define set_disc(x)   set_lvar_bit_on(LVAR_Bit_Discs, x)


/*******************************************************************
   Imported variables from the Map scripts. These should only be
   pointers and variables that need not be saved. If a variable
   Needs to be saved, make it a map variable (MVAR_)
*******************************************************************/


/*******************************************************************
   Local variables which do not need to be saved between map changes.
*******************************************************************/




/*******************************************************************
*******                         PROCEDURES                   *******
*******************************************************************/
procedure Node001;
procedure Node002;
procedure Node003;
procedure Node004;
procedure Node005;
procedure Node006;
procedure Node015;


/*******************************************************************
   The start procedure is the first procedure called when the map is
   first entered. Any initial information that needs to be set up
   should be placed in here.
*******************************************************************/


procedure start begin
end


/********************************************************************
********************************************************************/


procedure use_p_proc begin
   dialogue_system_enter;
end


procedure talk_p_proc begin
   start_gdialog(NAME,self_obj,4,-1,-1);
   gSay_Start;
      call Node001;
   gSay_End;
   end_dialogue;
end


/***************************************************************************
   This is cursory glance description that the player will receive should
   he just pass the Action Cursor over. Examines which give more information
   need to be in the description_p_proc procedure.
***************************************************************************/


procedure look_at_p_proc begin
   script_overrides;
   display_msg(mstr(100));
end


/**********************************************************************************
**********************************************************************************/


procedure description_p_proc begin
   script_overrides;
   display_msg(mstr(101));
end


/**********************************************************************************
   Make sure the door is working.
**********************************************************************************/


procedure use_skill_on_p_proc begin
end


/**********************************************************************************
   This is called when the player is using an object on the door. When the check is
   made to find out what is being used, obj_pid(obj_being_used_with) will need to
   be checked against a prototype.
**********************************************************************************/


procedure use_obj_on_p_proc begin
end


/******************************************************************************************
   IF it gets damaged it breaks
******************************************************************************************/


procedure damage_p_proc begin
end


/***************************************************************************************
   Whenever the map is first entered, this procedure will be called.
***************************************************************************************/


procedure map_enter_p_proc begin
end


/**************************************************************************************
   This procedure gets called roughly every 30 seconds of real time.
**************************************************************************************/


procedure map_update_p_proc begin
end


procedure Node999 begin
end


procedure Node001 begin
   Reply(102);
   NOption(103, Node002, 1);
   NOption(104, Node999, 1);
end


procedure Node002 begin
   Reply(105);
   if (dude_cur_hits != dude_max_hits) then begin
      NLowOption(106, Node003);
      NOption(111, Node003, 4);
   end
   if (dude_is_poisoned) then begin
      NLowOption(107, Node004);
      NOption(112, Node004, 4);
   end
   if (dude_is_irradiated) then begin
      NLowOption(108, Node005);
      NOption(113, Node005, 4);
   end
   if (dude_is_crippled) then begin
      NLowOption(109, Node006);
      NOption(114, Node006, 4);
   end
   NLowOption(110, Node999);
   NOption(115, Node999, 4);
end


procedure NodeHeal15 begin
   fadeout(500);
   critter_heal(dude_obj, dude_max_hits - dude_cur_hits);
   game_time_advance(ONE_GAME_MINUTE * 5);
   fadein(500);
   call Node015;
end


procedure NodePois15 begin
   fadeout(500);
   poison(dude_obj, -dude_is_poisoned);
   game_time_advance(ONE_GAME_MINUTE * 30);
   fadein(500);
   call Node015;
end


procedure NodeRad15 begin
   fadeout(500);
   radiation_dec(dude_obj, -dude_is_irradiated);
   game_time_advance(ONE_GAME_MINUTE * 60);
   fadein(500);
   call Node015;
end


procedure NodeCrip15 begin
   fadeout(500);
   critter_uninjure(dude_obj, (DAM_CRIP_LEG_LEFT bwor DAM_CRIP_LEG_RIGHT bwor DAM_CRIP_ARM_LEFT bwor DAM_CRIP_ARM_RIGHT));
   game_time_advance(ONE_GAME_DAY);
   fadein(500);
   call Node015;
end


procedure Node003 begin
   Reply(116);
   NLowOption(117, NodeHeal15);
   NLowOption(118, Node002);
   NOption(119, NodeHeal15, 4);
   NOption(120, Node002, 4);
end


procedure Node004 begin
   Reply(121);
   NLowOption(122, NodePois15);
   NLowOption(123, Node002);
   NOption(124, NodePois15, 4);
   NOption(125, Node002, 4);
end


procedure Node005 begin
   Reply(126);
   NLowOption(127, NodeRad15);
   NLowOption(128, Node002);
   NOption(129, NodeRad15, 4);
   NOption(130, Node002, 4);
end


procedure Node006 begin
   Reply(131);
   NLowOption(132, NodeCrip15);
   NLowOption(133, Node002);
   NOption(134, NodeCrip15, 4);
   NOption(135, Node002, 4);
end


procedure Node015 begin
   Reply(136);
   NOption(137, Node999, 1);
end

The new .int :
Code:
procedure start;
procedure use_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure use_obj_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;
procedure map_update_p_proc;
procedure talk_p_proc;
procedure Node001;
procedure Node002;
procedure Node003;
procedure Node004;
procedure Node005;
procedure Node006;
procedure Node015;
procedure Node999;
procedure NodeHeal15;
procedure NodePois15;
procedure NodeRad15;
procedure NodeCrip15;




procedure start
begin
end


procedure use_p_proc
begin
    dialogue_system_enter;
end


procedure look_at_p_proc
begin
    script_overrides;
    display_msg(message_str(1305, 100));
end


procedure description_p_proc
begin
    script_overrides;
    display_msg(message_str(1305, 101));
end


procedure use_skill_on_p_proc
begin
end


procedure use_obj_on_p_proc
begin
end


procedure damage_p_proc
begin
end


procedure map_enter_p_proc
begin
end


procedure map_update_p_proc
begin
end


procedure talk_p_proc
begin
    start_gdialog(1305, self_obj, 4, -1, -1);
    gsay_start;
    call Node001();
    gsay_end;
    end_dialogue;
end


procedure Node001
begin
    gsay_reply(1305, 102);
    giq_option(1, 1305, 103, Node002, 50);
    giq_option(1, 1305, 104, Node999, 50);
end


procedure Node002
begin
    gsay_reply(1305, 105);
    if (get_critter_stat(dude_obj, 35) != get_critter_stat(dude_obj, 7)) then begin
        giq_option(-3, 1305, 106, Node003, 50);
        giq_option(4, 1305, 111, Node003, 50);
    end
    if (get_poison(dude_obj)) then begin
        giq_option(-3, 1305, 107, Node004, 50);
        giq_option(4, 1305, 112, Node004, 50);
    end
    if (get_critter_stat(dude_obj, 37)) then begin
        giq_option(-3, 1305, 108, Node005, 50);
        giq_option(4, 1305, 113, Node005, 50);
    end
    if ((critter_state(dude_obj) bwand 4) or (critter_state(dude_obj) bwand 8) or (critter_state(dude_obj) bwand 16) or (critter_state(dude_obj) bwand 32)) then begin
        giq_option(-3, 1305, 109, Node006, 50);
        giq_option(4, 1305, 114, Node006, 50);
    end
    giq_option(-3, 1305, 110, Node999, 50);
    giq_option(4, 1305, 115, Node999, 50);
end


procedure Node003
begin
    gsay_reply(1305, 116);
    giq_option(-3, 1305, 117, NodeHeal15, 50);
    giq_option(-3, 1305, 118, Node002, 50);
    giq_option(4, 1305, 119, NodeHeal15, 50);
    giq_option(4, 1305, 120, Node002, 50);
end


procedure Node004
begin
    gsay_reply(1305, 121);
    giq_option(-3, 1305, 122, NodePois15, 50);
    giq_option(-3, 1305, 123, Node002, 50);
    giq_option(4, 1305, 124, NodePois15, 50);
    giq_option(4, 1305, 125, Node002, 50);
end


procedure Node005
begin
    gsay_reply(1305, 126);
    giq_option(-3, 1305, 127, NodeRad15, 50);
    giq_option(-3, 1305, 128, Node002, 50);
    giq_option(4, 1305, 129, NodeRad15, 50);
    giq_option(4, 1305, 130, Node002, 50);
end


procedure Node006
begin
    gsay_reply(1305, 131);
    giq_option(-3, 1305, 132, NodeCrip15, 50);
    giq_option(-3, 1305, 133, Node002, 50);
    giq_option(4, 1305, 134, NodeCrip15, 50);
    giq_option(4, 1305, 135, Node002, 50);
end


procedure Node015
begin
    gsay_reply(1305, 136);
    giq_option(1, 1305, 137, Node999, 50);
end


procedure Node999
begin
end


procedure NodeHeal15
begin
    gfade_out(500);
    critter_heal(dude_obj, get_critter_stat(dude_obj, 7) - get_critter_stat(dude_obj, 35));
    game_time_advance(60 * 10 * 5);
    gfade_in(500);
    call Node015();
end


procedure NodePois15
begin
    gfade_out(500);
    poison(dude_obj, -get_poison(dude_obj));
    game_time_advance(60 * 10 * 30);
    gfade_in(500);
    call Node015();
end


procedure NodeRad15
begin
    gfade_out(500);
    radiation_dec(dude_obj, -get_critter_stat(dude_obj, 37));
    game_time_advance(60 * 10 * 60);
    gfade_in(500);
    call Node015();
end


procedure NodeCrip15
begin
    gfade_out(500);
    critter_injure(dude_obj, 4 bwor 8 bwor 16 bwor 32 bwor 8388608);
    game_time_advance(24 * (60 * (60 * 10)));
    gfade_in(500);
    call Node015();
end


In the mapper i add the script to a computer, when i press F8 and click on it, the mappper crashes giving me this error...
I know it's not language problem (everything is in english)
Thanks alot for helping if you can :D
 
Last edited:
Exact same error when adding this script to a critter :
Code:
#include "..\headers\define.h"

#define NAME                    SCRIPT_ZGUYLOC
#define TOWN_REP_VAR            (GVAR_TOWN_REP_KLAMATH)


#include "..\headers\command.h"
#include "..\headers\NewReno.h"
#include "..\headers\ModReact.h"




procedure start;
procedure critter_p_proc;
procedure pickup_p_proc;
procedure talk_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;
procedure map_exit_p_proc;




procedure Node997;                                      // this Node handles the basic START CONDITIONS
procedure Node998;                                      // This Node is Always Combat
procedure Node999;                                      // This Node is Always Ending


procedure Node001;
procedure Node003;
procedure Node006;
procedure Node007;
procedure Node008;
procedure Node009;




#define LVAR_Herebefore                 (4)
#define LVAR_Hostile                    (5)
#define LVAR_Personal_Enemy             (6)


variable Only_Once:=0;


procedure start begin
end


procedure map_enter_p_proc begin
   Only_Once:=0;
   critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_TEAM_NUM,TEAM_KLAMATH);
   critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_PEASANT);
end


procedure map_exit_p_proc begin
end


procedure critter_p_proc begin
   if (((local_var(LVAR_Hostile) == 2)or(local_var(LVAR_Personal_Enemy) == 1)) and (obj_can_see_obj(self_obj,dude_obj))) then begin
      set_local_var(LVAR_Hostile,1);
      Flee_From_Dude
   end
end


procedure damage_p_proc begin
   if (source_obj == dude_obj) then begin
      set_local_var(LVAR_Personal_Enemy,1);
   end
end


procedure pickup_p_proc begin
   if (source_obj == dude_obj) then begin
      set_local_var(LVAR_Hostile,2);
   end
end


procedure talk_p_proc begin
   GetReaction;


   if (local_var(LVAR_Personal_Enemy) == 1) then begin
       call Node009;
   end


   else begin
       start_gdialog(NAME,self_obj,4,-1,-1);
       gSay_Start;
           call Node997;
       gSay_End;
       end_dialogue;
   end
end


procedure destroy_p_proc begin
   inc_good_critter
end


procedure look_at_p_proc begin
   script_overrides;
   display_msg(mstr(100));
end


procedure description_p_proc begin
   script_overrides;
   display_msg(mstr(101));
end


procedure use_skill_on_p_proc begin
end




procedure Node001 begin
   Reply(110);
   NOption(111,Node003,004);
   NOption(112,Node999,004);
end


procedure Node003 begin
   Reply(113);
   NOption(114,Node006,004);
   NOption(115,Node999,004);
end


procedure Node006 begin
   mark_Zmansion_on_map
   Reply(116);
   NOption(117,Node999,004);
end


procedure Node007 begin
   Reply(121);
   NLowOption(122,Node008);
end


procedure Node008 begin
   Reply(123);
   NLowOption(124,Node999);
end


procedure Node009 begin
   floater(random(200,201));
end


procedure Node997 begin
   if (get_critter_stat(dude_obj,STAT_iq) <= (0-LOW_IQ)) then begin
      call Node007;
   end else begin
      call Node001;
   end
end


procedure Node998 begin
   set_local_var(LVAR_Hostile,2);
end


procedure Node999 begin
end

I think i might be doing something wrong :evil:
If anyone knows what causes the script to not recognize the .msg please help :oops:

Edit : compiled :
Code:
variable global_temp;variable Static_Reaction;
variable Evil_Critter;
variable Slavery_Tolerant := 2;
variable reaction_bonus_town_rep;
variable reaction_bonus_karma;


procedure start;
procedure critter_p_proc;
procedure pickup_p_proc;
procedure talk_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;
procedure map_exit_p_proc;
procedure Node997;
procedure Node998;
procedure Node999;
procedure Node001;
procedure Node003;
procedure Node006;
procedure Node007;
procedure Node008;
procedure Node009;


variable Only_Once;




procedure start
begin
end


procedure critter_p_proc
begin
    if ((local_var(5) == 2) or (local_var(6) == 1) and obj_can_see_obj(self_obj, dude_obj)) then begin
        set_local_var(5, 1);
        if ((tile_distance_objs(self_obj, dude_obj) < 8) or obj_can_see_obj(self_obj, dude_obj)) then begin
            if (anim_busy(self_obj) == 0) then begin
                global_temp := rotation_to_tile(tile_num(dude_obj), tile_num(self_obj));
                animate_move_obj_to_tile(self_obj, tile_num_in_direction(tile_num(self_obj), global_temp, random(3, 10)), 1);
                global_temp := (global_temp + 1) % 6;
                while ((anim_busy(self_obj) == 0) and (global_temp != rotation_to_tile(tile_num(dude_obj), tile_num(self_obj)))) do begin
                    debug_msg("flee loop: rot == " + global_temp);
                    animate_move_obj_to_tile(self_obj, tile_num_in_direction(tile_num(self_obj), global_temp, random(3, 10)), 1);
                    global_temp := (global_temp + 1) % 6;
                end
            end
        end
    end
end


procedure pickup_p_proc
begin
    if (source_obj == dude_obj) then begin
        set_local_var(5, 2);
    end
end


procedure talk_p_proc
begin
    if (local_var(2) == 0) then begin
        set_local_var(2, 1);
        set_local_var(3, (get_critter_stat(dude_obj, 3) - get_critter_stat(self_obj, 3)) * 5);
        debug_msg("Base Reaction == " + local_var(3));
    end
    Static_Reaction := 0;
    set_local_var(0, 0);
    debug_msg("Start Reaction == " + local_var(0));
    if (reaction_bonus_karma >= 0) then begin
        reaction_bonus_karma := reaction_bonus_karma / 1000;
    end
    else begin
        reaction_bonus_karma := -1 * (-1 * reaction_bonus_karma / 1000);
    end
    if (global_var(48) >= 0) then begin
        reaction_bonus_town_rep := global_var(48) / 2;
    end
    else begin
        reaction_bonus_town_rep := -1 * (-1 * global_var(48) / 2);
    end
    if (has_trait(2, dude_obj, 13)) then begin
        if (get_critter_stat(dude_obj, 34) == get_critter_stat(self_obj, 34)) then begin
            Static_Reaction := Static_Reaction + -20;
        end
        else begin
            Static_Reaction := Static_Reaction + 20;
        end
        debug_msg("Sex Appeal Bonus == " + Static_Reaction);
    end
    else begin
        debug_msg("Sex Appeal Bonus == 0");
    end
    if (Evil_Critter == 1) then begin
        Static_Reaction := Static_Reaction - reaction_bonus_karma;
        debug_msg("Karma Reaction Bonus == " + Static_Reaction);
        Static_Reaction := Static_Reaction - reaction_bonus_town_rep;
        debug_msg("Town Rep Bonus == " + Static_Reaction);
        set_global_var(37, 0);
        set_global_var(38, 0);
        set_global_var(39, 0);
        set_global_var(40, 0);
        set_global_var(41, 0);
        set_global_var(42, 0);
        set_global_var(43, 0);
        set_global_var(44, 0);
        set_global_var(45, 0);
        if (global_var(0) >= 1000) then begin
            set_global_var(37, 1);
        end
        else begin
            if (global_var(0) >= 750) then begin
                set_global_var(38, 1);
            end
            else begin
                if (global_var(0) >= 500) then begin
                    set_global_var(39, 1);
                end
                else begin
                    if (global_var(0) >= 250) then begin
                        set_global_var(40, 1);
                    end
                    else begin
                        if (global_var(0) > -250) then begin
                            set_global_var(41, 1);
                        end
                        else begin
                            if (global_var(0) > -500) then begin
                                set_global_var(42, 1);
                            end
                            else begin
                                if (global_var(0) > -750) then begin
                                    set_global_var(43, 1);
                                end
                                else begin
                                    if (global_var(0) > -1000) then begin
                                        set_global_var(44, 1);
                                    end
                                    else begin
                                        set_global_var(45, 1);
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end
        if (global_var(37) == 1) then begin
            Static_Reaction := Static_Reaction - 20;
        end
        else begin
            if (global_var(38) == 1) then begin
                Static_Reaction := Static_Reaction - 15;
            end
            else begin
                if (global_var(39) == 1) then begin
                    Static_Reaction := Static_Reaction - 10;
                end
                else begin
                    if (global_var(40) == 1) then begin
                        Static_Reaction := Static_Reaction - 5;
                    end
                    else begin
                        if (global_var(41) == 1) then begin
                            Static_Reaction := Static_Reaction - 0;
                        end
                        else begin
                            if (global_var(42) == 1) then begin
                                Static_Reaction := Static_Reaction - -5;
                            end
                            else begin
                                if (global_var(43) == 1) then begin
                                    Static_Reaction := Static_Reaction - -10;
                                end
                                else begin
                                    if (global_var(44) == 1) then begin
                                        Static_Reaction := Static_Reaction - -15;
                                    end
                                    else begin
                                        Static_Reaction := Static_Reaction - -20;
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end
        debug_msg("Bad Person Reaction Bonus == " + Static_Reaction);
    end
    else begin
        Static_Reaction := Static_Reaction + reaction_bonus_karma;
        debug_msg("Karma Reaction Bonus == " + Static_Reaction);
        Static_Reaction := Static_Reaction + reaction_bonus_town_rep;
        debug_msg("Town Rep Bonus == " + Static_Reaction);
        set_global_var(37, 0);
        set_global_var(38, 0);
        set_global_var(39, 0);
        set_global_var(40, 0);
        set_global_var(41, 0);
        set_global_var(42, 0);
        set_global_var(43, 0);
        set_global_var(44, 0);
        set_global_var(45, 0);
        if (global_var(0) >= 1000) then begin
            set_global_var(37, 1);
        end
        else begin
            if (global_var(0) >= 750) then begin
                set_global_var(38, 1);
            end
            else begin
                if (global_var(0) >= 500) then begin
                    set_global_var(39, 1);
                end
                else begin
                    if (global_var(0) >= 250) then begin
                        set_global_var(40, 1);
                    end
                    else begin
                        if (global_var(0) > -250) then begin
                            set_global_var(41, 1);
                        end
                        else begin
                            if (global_var(0) > -500) then begin
                                set_global_var(42, 1);
                            end
                            else begin
                                if (global_var(0) > -750) then begin
                                    set_global_var(43, 1);
                                end
                                else begin
                                    if (global_var(0) > -1000) then begin
                                        set_global_var(44, 1);
                                    end
                                    else begin
                                        set_global_var(45, 1);
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end
        if (global_var(37) == 1) then begin
            Static_Reaction := Static_Reaction + 20;
        end
        else begin
            if (global_var(38) == 1) then begin
                Static_Reaction := Static_Reaction + 15;
            end
            else begin
                if (global_var(39) == 1) then begin
                    Static_Reaction := Static_Reaction + 10;
                end
                else begin
                    if (global_var(40) == 1) then begin
                        Static_Reaction := Static_Reaction + 5;
                    end
                    else begin
                        if (global_var(41) == 1) then begin
                            Static_Reaction := Static_Reaction + 0;
                        end
                        else begin
                            if (global_var(42) == 1) then begin
                                Static_Reaction := Static_Reaction + -5;
                            end
                            else begin
                                if (global_var(43) == 1) then begin
                                    Static_Reaction := Static_Reaction + -10;
                                end
                                else begin
                                    if (global_var(44) == 1) then begin
                                        Static_Reaction := Static_Reaction + -15;
                                    end
                                    else begin
                                        Static_Reaction := Static_Reaction + -20;
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end
        debug_msg("Good Person Reaction Bonus == " + Static_Reaction);
    end
    if (Slavery_Tolerant == 0) then begin
        if (global_var(11) == 1) then begin
            Static_Reaction := Static_Reaction + (2 * -25);
        end
    end
    else begin
        if (Slavery_Tolerant == 1) then begin
            if (global_var(11) == 1) then begin
                Static_Reaction := Static_Reaction + -25;
            end
        end
        else begin
            if (Slavery_Tolerant == 3) then begin
                if (global_var(11) == 1) then begin
                    Static_Reaction := Static_Reaction - -25;
                end
            end
        end
    end
    debug_msg("Slaver + Aligned Reaction == " + Static_Reaction);
    Static_Reaction := Static_Reaction + (10 * has_trait(0, dude_obj, 10));
    debug_msg("Presence Reaction == " + Static_Reaction);
    if (global_var(1) >= 2) then begin
        Static_Reaction := Static_Reaction + -30;
    end
    debug_msg("Childkiller Reaction == " + Static_Reaction);
    set_local_var(0, local_var(3) + Static_Reaction);
    debug_msg("Initial Reaction == " + local_var(0));
    if (local_var(6) == 1) then begin
        call Node009();
    end
    else begin
        start_gdialog(1305, self_obj, 4, -1, -1);
        gsay_start;
        call Node997();
        gsay_end;
        end_dialogue;
    end
end


procedure destroy_p_proc
begin
    if (source_obj == dude_obj) then begin
        set_global_var(5, global_var(5) + 1);
        if (((global_var(4) + global_var(5)) >= 25) and ((global_var(4) > (3 * global_var(5))) or (global_var(2) == 1)) and (global_var(1) == 0)) then begin
            set_global_var(2, 1);
            set_global_var(3, 0);
        end
        if (metarule(51, self_obj) == 2) then begin
            if (source_obj == dude_obj) then begin
                set_global_var(2, 0);
                set_global_var(1, global_var(1) + 1);
                set_global_var(0, global_var(0) + -15);
                debug_msg("Player gains " + -15 + " Karma Points.");
                set_global_var(37, 0);
                set_global_var(38, 0);
                set_global_var(39, 0);
                set_global_var(40, 0);
                set_global_var(41, 0);
                set_global_var(42, 0);
                set_global_var(43, 0);
                set_global_var(44, 0);
                set_global_var(45, 0);
                if (global_var(0) >= 1000) then begin
                    set_global_var(37, 1);
                end
                else begin
                    if (global_var(0) >= 750) then begin
                        set_global_var(38, 1);
                    end
                    else begin
                        if (global_var(0) >= 500) then begin
                            set_global_var(39, 1);
                        end
                        else begin
                            if (global_var(0) >= 250) then begin
                                set_global_var(40, 1);
                            end
                            else begin
                                if (global_var(0) > -250) then begin
                                    set_global_var(41, 1);
                                end
                                else begin
                                    if (global_var(0) > -500) then begin
                                        set_global_var(42, 1);
                                    end
                                    else begin
                                        if (global_var(0) > -750) then begin
                                            set_global_var(43, 1);
                                        end
                                        else begin
                                            if (global_var(0) > -1000) then begin
                                                set_global_var(44, 1);
                                            end
                                            else begin
                                                set_global_var(45, 1);
                                            end
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
                set_global_var(48, global_var(48) + -8);
                debug_msg("Added " + -8 + " to Town Rep");
            end
        end
        if (((global_var(4) + global_var(5)) >= 25) and ((global_var(5) > (2 * global_var(4))) or (global_var(3) == 1))) then begin
            set_global_var(3, 1);
            set_global_var(2, 0);
        end
        set_global_var(0, global_var(0) + -10);
        debug_msg("Player gains " + -10 + " Karma Points.");
        set_global_var(37, 0);
        set_global_var(38, 0);
        set_global_var(39, 0);
        set_global_var(40, 0);
        set_global_var(41, 0);
        set_global_var(42, 0);
        set_global_var(43, 0);
        set_global_var(44, 0);
        set_global_var(45, 0);
        if (global_var(0) >= 1000) then begin
            set_global_var(37, 1);
        end
        else begin
            if (global_var(0) >= 750) then begin
                set_global_var(38, 1);
            end
            else begin
                if (global_var(0) >= 500) then begin
                    set_global_var(39, 1);
                end
                else begin
                    if (global_var(0) >= 250) then begin
                        set_global_var(40, 1);
                    end
                    else begin
                        if (global_var(0) > -250) then begin
                            set_global_var(41, 1);
                        end
                        else begin
                            if (global_var(0) > -500) then begin
                                set_global_var(42, 1);
                            end
                            else begin
                                if (global_var(0) > -750) then begin
                                    set_global_var(43, 1);
                                end
                                else begin
                                    if (global_var(0) > -1000) then begin
                                        set_global_var(44, 1);
                                    end
                                    else begin
                                        set_global_var(45, 1);
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end
        set_global_var(48, global_var(48) + -5);
        debug_msg("Added " + -5 + " to Town Rep");
    end
end


procedure look_at_p_proc
begin
    script_overrides;
    display_msg(message_str(1305, 100));
end


procedure description_p_proc
begin
    script_overrides;
    display_msg(message_str(1305, 101));
end


procedure use_skill_on_p_proc
begin
end


procedure damage_p_proc
begin
    if (source_obj == dude_obj) then begin
        set_local_var(6, 1);
    end
end


procedure map_enter_p_proc
begin
    Only_Once := 0;
    critter_add_trait(self_obj, 1, 6, 43);
    critter_add_trait(self_obj, 1, 5, 14);
end


procedure map_exit_p_proc
begin
end


procedure Node997
begin
    if (get_critter_stat(dude_obj, 4) <= (0 - -3)) then begin
        call Node007();
    end
    else begin
        call Node001();
    end
end


procedure Node998
begin
    set_local_var(5, 2);
end


procedure Node999
begin
end


procedure Node001
begin
    gsay_reply(1305, 110);
    giq_option(4, 1305, 111, Node003, 50);
    giq_option(4, 1305, 112, Node999, 50);
end


procedure Node003
begin
    gsay_reply(1305, 113);
    giq_option(4, 1305, 114, Node006, 50);
    giq_option(4, 1305, 115, Node999, 50);
end


procedure Node006
begin
    if (metarule(17, 49) == 0) then begin
        debug_msg("  mark_on_map(" + 49 + ")");
        mark_area_known(0, 49, 1);
    end
    gsay_reply(1305, 116);
    giq_option(4, 1305, 117, Node999, 50);
end


procedure Node007
begin
    gsay_reply(1305, 121);
    giq_option(-3, 1305, 122, Node008, 50);
end


procedure Node008
begin
    gsay_reply(1305, 123);
    giq_option(-3, 1305, 124, Node999, 50);
end


procedure Node009
begin
    float_msg(self_obj, message_str(1305, random(200, 201)), 8);
end
 
Last edited:
The most obvious reason to your problem would be if the MSG-file don't have the exact same name as the INT-file.

Another possibility could be if 1305 is not your script (1305 is the number of the line that the script is placed on in scripts.lst), but some other with either no message file or no dialog lines on the numbers you are calling for. This could happen if SCRIPTS.H is not updated to have the same amount of scripts that SCRIPTS.LST has.

A third reason could be that there is something strange with your compiled scripts. When you call a node you have a couple of parenthesis after, like "call Node009();". They shouldn't be there, and in fact, when I recompile your scripts without changing anything, they are automatically removed.

I have tested your last script in the Mapper and it works fine for me at least. Just so you know. :smile:
 
Last edited:
I love you Darek !
It was actually the 2nd possibility. The problem was that i was using the RP and never thought there was a link between SCRIPTS.H and SCRIPTS.LST
Thanks so much ! I'll finish my mod this afternoon if i got time
And Happy New Year ;)
 
Back
Top