View Single Post
Old 06-29-2012, 11:14 PM   #203
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,286
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
Alright, so I've come here with an on enter script filled with conditionals. Now my only problem with this script while compiling, at least so far, is that I keep getting syntax errors at the && symbols in lines 52, 78 and 103, or all the lines I've put in red. I believe it has something to do with the parentheses on the ends of each line but I'm not entirely sure. Could anyone please help?

(The commented out lines with stars in them are there to help me keep track of what's happening in the script.)

Code:
#include "k_inc_debug" 
#include "k_inc_utility" 
 
void main() 
{ 

//***** DEFINING THE OBJECTS *****\\

object oPC = GetFirstPC();

object oHound = GetObjectByTag("g_hound01");

object oCantDoor = GetObjectByTag("d_654_dor01");

object oSwooper = GetObjectByTag("swoopmcx01");

//***** DEFINING THE CONDITIONAL CHECKS *****\\

               int ncheck = GetGlobalNumber("dt_num01");

  int iResult = ((GetGlobalBoolean("dt_check01")));

  int iResult2 = ((GetGlobalBoolean("dt_check02")));

  int iResult3 = ((GetGlobalBoolean("dt_check03")));

  int iResult4 = ((GetGlobalBoolean("dt_check04")));

//***** BEGINNING CONDITIONAL FOR SPAWN *****\\

if (!GetLocalBoolean(OBJECT_SELF, 40) && (GetEnteringObject() == GetFirstPC())) { 

   if (ncheck != 5)
   {
 
SetLocalBoolean(OBJECT_SELF, 40, TRUE); 

vector cPosition=Vector(29.7199993133545,-32.4500007629395,0.06339);
location lHound=Location(cPosition,175.01396);
 
    object oCre = CreateObject(OBJECT_TYPE_CREATURE, "g_hound01", lHound); 


    }

	}

//***** CONDITIONAL FOR NEVER TALKING *****\\

   if (iResult == TRUE) && (!GetLocalBoolean(OBJECT_SELF, 41) && (GetEnteringObject() == GetFirstPC())) {

DestroyObject(oHound);

SetLocalBoolean(OBJECT_SELF, 41, TRUE); 


//***** CONDITIONAL FOR CHECKING IF PC ENTERED IN FROM CLOSE TO CUTSCENE POINT *****\\

if( GetDistanceBetween(oCantDoor, oPC) <= 5.0 ) {

AssignCommand(oSwooper, ActionStartConversation(oPC, "dt_man_dist"));

                                                 }

//***** CONDITIONAL FOR DID NOT ENTER THE AREA CLOSE TO CUTSCENE POINT*****\\

if( GetDistanceBetween(oCantDoor, oPC) > 5.0 ) {

SetGlobalBoolean(dt_304_trig, FALSE);

                                                }
                                                                  }

//***** CONDITIONAL IF THE PC TOLD PERSON TO LEAVE *****\\

   if (iResult2 == TRUE) && (!GetLocalBoolean(OBJECT_SELF, 42) && (GetEnteringObject() == GetFirstPC())) {

DestroyObject(oHound);

SetLocalBoolean(OBJECT_SELF, 42, TRUE); 


//***** CONDITIONAL FOR CHECKING IF PC ENTERED IN FROM CLOSE TO CUTSCENE POINT *****\\

if( GetDistanceBetween(oCantDoor, oPC) <= 5.0 ) {

AssignCommand(oSwooper, ActionStartConversation(oPC, "dt_man_hap"));

                                                 }

//***** CONDITIONAL FOR DID NOT ENTER THE AREA CLOSE TO CUTSCENE POINT*****\\

if( GetDistanceBetween(oCantDoor, oPC) > 5.0 ) {

SetGlobalBoolean(dt_304_trig, FALSE);

                                                }
                                                                  }

//***** CONDITIONAL IF THE PC WANTED IT DONE BUT TOOK TOO LONG *****\\

   if (iResult3 == TRUE) && (iResult4 == TRUE) && (!GetLocalBoolean(OBJECT_SELF, 43) && (GetEnteringObject() == GetFirstPC())) {

DestroyObject(oHound);

SetLocalBoolean(OBJECT_SELF, 43, TRUE); 

//***** CONDITIONAL FOR CHECKING IF PC ENTERED IN FROM CLOSE TO CUTSCENE POINT *****\\

if( GetDistanceBetween(oCantDoor, oPC) <= 5.0 ) {

AssignCommand(oSwooper, ActionStartConversation(oPC, "dt_man_sdlor"));

                                                 }

//***** CONDITIONAL FOR DID NOT ENTER THE AREA CLOSE TO CUTSCENE POINT*****\\

if( GetDistanceBetween(oCantDoor, oPC) > 5.0 ) {

SetGlobalBoolean(CC_207_TRIGGER, FALSE);

                                                }
                                                                  }




}


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is online now   you may: quote & reply,