|
Haris
Member
Откуда: Sweden Регистрация: Янв. 2005
Всего: 12 сообщений
|
According to watcom its expecting "then" somewhere in this part of script.
Цитата:
procedure talk_p_proc begin if (dude_charisma < 3)and(dude_level) < 1) and (has_skill(dude_obj,SKILL_SCIENCE) < 20) then begin call Node001; else if ((obj_is_carrying_obj_pid(dude_obj, PID_44_MAGNUM_REVOLVER) > 0) then begin call Node003; end else begin start_gdialog(NAME,self_obj,4,-1,-1); gSay_Start; then begin call Node002; gSay_End; end_dialogue; end end procedure destroy_p_proc begin flick_obj := 0; set_flick_dead; inc_evil_critter end procedure look_at_p_proc begin script_overrides; display_mstr(100); end procedure description_p_proc begin script_overrides; display_mstr(150 + herebefore); set_examined; end procedure use_skill_on_p_proc begin end procedure Node998 begin set_hostile; end procedure Node999 begin end procedure Node900 begin remove_pid_qty(dude_obj, PID_44_MAGNUM_REVOLVER, 1); give_pid_qty(dude_obj, PID_44_MAGNUM_SPEEDLOADER, 1); item_caps_adjust(dude_obj, 8000); give_xp(10000); then begin call Node004; end procedure Node001 begin floater (200); end procedure Node002 begin Reply(201); NOption(202, Node999, 004); end procedure Node003 begin Reply(203); NOption(204, Node004, 004); NOption(205, Node999, 004); end procedure Node004 begin Reply(206); NOption(207, Node999, 004); end
Yea dont ask me what this script is for its just a test script for later editing and making quests out of it. And this is not entire script i just took the part that is errored and i cant see whats wrong with it.
|
Отправлено: 23:27 - 12 Фев., 2005
|
|
Ray
Модератор
Откуда: Донецк,Украина Регистрация: Янв. 2004
Всего: 746 сообщений
|
You should remove "begin" after if (dude_charisma < 3)and(dude_level) < 1) and (has_skill(dude_obj,SKILL_SCIENCE) < 20) then ________________________________________ Or,second variant : procedure talk_p_proc begin if ((dude_charisma < 3)and(dude_level) < 1) and (has_skill(dude_obj,SKILL_SCIENCE) < 20)) then begin call Node001; end else if ((obj_is_carrying_obj_pid(dude_obj, PID_44_MAGNUM_REVOLVER) > 0) then begin call Node003; end ........................ Maybe someone can find another mistakes? P.S Sorry for my English
----- Не бывает невозможных задач – бывает мало времени.
|
Отправлено: 2:07 - 13 Фев., 2005
|
|
Haris
Member
Откуда: Sweden Регистрация: Янв. 2005
Всего: 12 сообщений
|
Ok that didnt fix the problem. It still says "then" expected line 10263. Or somewhere around that line depending how much i edit. so it must be below the thing you said it was wrong. Here is the entire script.
Цитата:
/* Copyright 1998-2003 Interplay Entertainment Corp. All rights reserved. */ /* Name: Location: Den Description: Log: Created: August 22, 1998 Updated: */ /* Include Files */ #include "..\headers\define.h" #define NAME SCRIPT_DCFLICK #define TOWN_REPUTATION GVAR_TOWN_REP_THE_DEN #include "..\headers\command.h" #include "..\headers\ModReact.h" #include "..\headers\Den.h" /* Standard Script Procedures */ 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 timed_event_p_proc; /* Script Specific Procedure Calls */ procedure Node998; // This Node is Always Combat procedure Node999; // This Node is Always Ending procedure Node001; procedure Node002; procedure Node003; procedure Node004; procedure Node900; /* Local Variables which are saved. All Local Variables need to be prepended by LVAR_ */ #define LVAR_Flags (4) /* 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. */ procedure map_enter_p_proc begin //flick_obj := self_obj; if (is_loading_game == false) then begin if (map_first_run) then begin critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_TEAM_NUM,TEAM_THE_DEN); critter_add_trait(self_obj,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_LONER_CITIZEN); end end end procedure critter_p_proc begin if (self_can_see_dude) then begin if (hostile) then begin self_attack_dude; end end end procedure damage_p_proc begin if (source_obj == dude_obj) then begin set_personal_enemy; end end procedure pickup_p_proc begin if (source_obj == dude_obj) then begin call Node998; end end procedure talk_p_proc begin if ((dude_charisma < 3)and(dude_level) < 1) and (has_skill(dude_obj,SKILL_SCIENCE) < 20)) then begin call Node001; end else if ((obj_is_carrying_obj_pid(dude_obj, PID_44_MAGNUM_REVOLVER) > 0) then begin start_gdialog(NAME,self_obj,4,-1,-1); gSay_Start; then begin call Node003; gSay_End; end_dialogue; end end else begin start_gdialog(NAME,self_obj,4,-1,-1); gSay_Start; then begin call Node002; gSay_End; end_dialogue; end end procedure destroy_p_proc begin flick_obj := 0; set_flick_dead; inc_evil_critter end procedure look_at_p_proc begin script_overrides; display_mstr(100); end procedure description_p_proc begin script_overrides; display_mstr(150 + herebefore); set_examined; end procedure use_skill_on_p_proc begin end procedure Node998 begin set_hostile; end procedure Node999 begin end procedure Node900 begin remove_pid_qty(dude_obj, PID_44_MAGNUM_REVOLVER, 1); give_pid_qty(dude_obj, PID_44_MAGNUM_SPEEDLOADER, 1); item_caps_adjust(dude_obj, 8000); give_xp(10000); then begin call Node004; end procedure Node001 begin floater (200); end procedure Node002 begin Reply(201); NOption(202, Node999, 004); end procedure Node003 begin Reply(203); NOption(204, Node004, 004); NOption(205, Node999, 004); end procedure Node004 begin Reply(206); NOption(207, Node999, 004); end
|
Отправлено: 17:41 - 13 Фев., 2005
|
|
Ray
Модератор
Откуда: Донецк,Украина Регистрация: Янв. 2004
Всего: 746 сообщений
|
Talk_p_proc should be : procedure talk_p_proc begin if ((dude_charisma < 3)and(dude_level) < 1) and (has_skill(dude_obj,SKILL_SCIENCE) < 20)) then begin call Node001; end else if ((obj_is_carrying_obj_pid(dude_obj, PID_44_MAGNUM_REVOLVER) > 0) then begin start_gdialog(NAME,self_obj,4,-1,-1); gSay_Start; call Node003; gSay_End; end_dialogue; end else begin start_gdialog(NAME,self_obj,4,-1,-1); gSay_Start; call Node002; gSay_End; end_dialogue; end end
----- Не бывает невозможных задач – бывает мало времени.
|
Отправлено: 18:21 - 13 Фев., 2005
|
|
Haris
Member
Откуда: Sweden Регистрация: Янв. 2005
Всего: 12 сообщений
|
Well i made it look exactly like you said and it still says its expecting "then" somewhere. I am pretty sure its in the lines below talk_p_proc.
|
Отправлено: 19:19 - 13 Фев., 2005
|
|
Wasteland Ghost
Маленькое Злое Привидение
Откуда: Россия, Самара Регистрация: Дек. 2002
Всего: 2251 сообщение
|
Must be remove_pid_qty(dude_obj, PID_44_MAGNUM_REVOLVER, 1) give_pid_qty(dude_obj, PID_44_MAGNUM_SPEEDLOADER, 1) remove_pid_qty and give_pid_qty are macros, which already include ;
|
Отправлено: 9:58 - 14 Фев., 2005
|
|
Haris
Member
Откуда: Sweden Регистрация: Янв. 2005
Всего: 12 сообщений
|
Well that was one more of errors i fixed now. But still there is one expecting "then" somewhere in the script below talk_p_proc. So if anyone can see it please tell me.
|
Отправлено: 16:28 - 14 Фев., 2005
|
|
Raven
Пользователь
Откуда: Владик Регистрация: Февр. 2004
Всего: 408 сообщений
|
procedure Node900 begin remove_pid_qty(dude_obj, PID_44_MAGNUM_REVOLVER, 1); give_pid_qty(dude_obj, PID_44_MAGNUM_SPEEDLOADER, 1); item_caps_adjust(dude_obj, 8000); give_xp(10000); then begin //???? where the IF statement? call Node004; end
|
Отправлено: 16:34 - 14 Фев., 2005
|
|
Haris
Member
Откуда: Sweden Регистрация: Янв. 2005
Всего: 12 сообщений
|
Yea i fixed that to, but thats not whats showing up as error. It keeps saying that i am missing ""Then"" somwhere in the script.
|
Отправлено: 18:17 - 14 Фев., 2005
|
|
Raven
Пользователь
Откуда: Владик Регистрация: Февр. 2004
Всего: 408 сообщений
|
---------------------------------------------- procedure talk_p_proc begin if ((dude_charisma < 3)and(dude_level) < 1) and (has_skill(dude_obj,SKILL_SCIENCE) < 20)) then begin call Node001; end else if ((obj_is_carrying_obj_pid(dude_obj, PID_44_MAGNUM_REVOLVER) > 0) then begin start_gdialog(NAME,self_obj,4,-1,-1); gSay_Start; then begin //Drop this call Node003; gSay_End; end_dialogue; end //and this end else begin start_gdialog(NAME,self_obj,4,-1,-1); gSay_Start; then begin //and this call Node002; gSay_End; end_dialogue; end end ---------------------------------------------- Finally: ---------------------------------------------- procedure talk_p_proc begin if ((dude_charisma < 3)and(dude_level) < 1) and (has_skill(dude_obj,SKILL_SCIENCE) < 20)) then begin call Node001; end else if ((obj_is_carrying_obj_pid(dude_obj, PID_44_MAGNUM_REVOLVER) > 0) then begin start_gdialog(NAME,self_obj,4,-1,-1); gSay_Start; call Node003; gSay_End; end_dialogue; end else begin start_gdialog(NAME,self_obj,4,-1,-1); gSay_Start; call Node002; gSay_End; end_dialogue; end end ----------------------------------------------
|
Отправлено: 18:26 - 14 Фев., 2005
|
|
Ray
Модератор
Откуда: Донецк,Украина Регистрация: Янв. 2004
Всего: 746 сообщений
|
2 Raven: Look at my post. Can you find any differences?
----- Не бывает невозможных задач – бывает мало времени.
|
Отправлено: 18:48 - 14 Фев., 2005
|
|
Raven
Пользователь
Откуда: Владик Регистрация: Февр. 2004
Всего: 408 сообщений
|
to Ray Я смотрел только на оригинальный листинг и искал ошибки. Разницы действительно нет. to Haris BAH! I found it! Replace this: if ((dude_charisma < 3)and(dude_level) < 1) and (has_skill(dude_obj,SKILL_SCIENCE) < 20)) then with this: if ((dude_charisma < 3)and(dude_level) < 1 and (has_skill(dude_obj,SKILL_SCIENCE) < 20)) then All because of unneeded right bracet.
|
Отправлено: 19:08 - 14 Фев., 2005
|
|
Haris
Member
Откуда: Sweden Регистрация: Янв. 2005
Всего: 12 сообщений
|
Well i menaged to compile it in the end and actually it worked inside game except some funktions in the script did not trigger off. Stuff like gaining money and exp or ever giving away they gun and getting better one. even thoe speaking lines and npc actually asking about it worked. Well now i really have to hammer it out till it works. But this was my first working compilation and test run of a custom script for fallout 2. (Edited by Haris at 1:58 - 15 Feb., 2005) (Edited by Haris at 2:00 - 15 Feb., 2005)
|
Отправлено: 19:33 - 14 Фев., 2005
|
|
|
|