Guest Stukov Posted August 16, 2008 Report Share Posted August 16, 2008 I've been playing with some of the LA Mod scripts in order to set up a "sub station" in another part of the freeplay map. The issue I'm having is within the "ToFireStation" script by Hoppah, though I've heavily modified it for use at this sub station. At one point, I had it working except that once the truck returned to the sub station, it turned around and headed for the main station. I believe I fixed it, but now I get a "Parenthesis does not match" error and I can't figure it out. It gives my LINE 177 which is the closing brackets at the end of this block of code:object DummyCheckParkedSub : CommandScript{ DummyCheckParkedSub() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID) { } void PushActions(GameObject *Caller, Actor *Target, int ChildID) { bool ParkinglotFound = false; Vehicle v(Caller); if(StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE01) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE02) == 0) { GameObjectList l3; Game::CollectObstaclesOnVirtualObject(VO_ENGINE05, l3, ACTOR_VEHICLE); if(l3.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { ParkinglotFound = true; ActorList l1 = Game::GetActors(VO_ENGINE05); v.AssignCommand(DUMMY_ENGINE); } } if(ParkinglotFound) { if(l1.GetNumActors() > 0) Vector Park = l1.GetActor(0)->GetPosition(); if (v.HasCommand(DUMMY_VCALLED)) v.RemoveCommand(DUMMY_VCALLED); if(StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE01) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE02) { v.PushActionWait(ACTION_APPEND, 10.0f); v.PushActionMove(ACTION_APPEND, Park); v.PushActionWait(ACTION_APPEND, 0.5f); PersonList passengers = v.GetPassengers(); if (passengers.GetNumPersons() > 0) v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_SUBSTATION, Caller, 0, false); } } }};I figured since this doesn't seem to be specific to the code itself but rather a syntax error, someone could help? I've checked and double checked all the brackets and parenthesis, but I can't figure it out. And like I said, this code is credited to Hoppah and his LA Mod. I simply modified it for my personal use. Quote Link to comment Share on other sites More sharing options...
anto.fra88 Posted August 16, 2008 Report Share Posted August 16, 2008 I've been playing with some of the LA Mod scripts in order to set up a "sub station" in another part of the freeplay map. The issue I'm having is within the "ToFireStation" script by Hoppah, though I've heavily modified it for use at this sub station. At one point, I had it working except that once the truck returned to the sub station, it turned around and headed for the main station. I believe I fixed it, but now I get a "Parenthesis does not match" error and I can't figure it out. It gives my LINE 177 which is the closing brackets at the end of this block of code:object DummyCheckParkedSub : CommandScript{ DummyCheckParkedSub() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID) { } void PushActions(GameObject *Caller, Actor *Target, int ChildID) { bool ParkinglotFound = false; Vehicle v(Caller); if(StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE01) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE02) == 0) { GameObjectList l3; Game::CollectObstaclesOnVirtualObject(VO_ENGINE05, l3, ACTOR_VEHICLE); if(l3.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { ParkinglotFound = true; ActorList l1 = Game::GetActors(VO_ENGINE05); v.AssignCommand(DUMMY_ENGINE); } } if(ParkinglotFound) { if(l1.GetNumActors() > 0) Vector Park = l1.GetActor(0)->GetPosition(); if (v.HasCommand(DUMMY_VCALLED)) v.RemoveCommand(DUMMY_VCALLED); if(StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE01) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE02) { v.PushActionWait(ACTION_APPEND, 10.0f); v.PushActionMove(ACTION_APPEND, Park); v.PushActionWait(ACTION_APPEND, 0.5f); PersonList passengers = v.GetPassengers(); if (passengers.GetNumPersons() > 0) v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_SUBSTATION, Caller, 0, false); } } }};I figured since this doesn't seem to be specific to the code itself but rather a syntax error, someone could help? I've checked and double checked all the brackets and parenthesis, but I can't figure it out. And like I said, this code is credited to Hoppah and his LA Mod. I simply modified it for my personal use.see if it do object DummyCheckParkedSub : CommandScript{ DummyCheckParkedSub() { SetGroupID(DummyGroup); } bool CheckTarget(GameObject *Caller, Actor *Target, int ChildID) { } void PushActions(GameObject *Caller, Actor *Target, int ChildID) { bool ParkinglotFound = false; Vehicle v(Caller); if(StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE01) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE02) == 0) { GameObjectList l3; Game::CollectObstaclesOnVirtualObject(VO_ENGINE05, l3, ACTOR_VEHICLE); if(l3.GetNumObjects() > 0) { Mission::PlayHint(HINT_NOSPACE); v.PushActionReturnToBase(ACTION_NEWLIST); return; } else { ParkinglotFound = true; ActorList l1 = Game::GetActors(VO_ENGINE05); v.AssignCommand(DUMMY_ENGINE); } } if(ParkinglotFound) { if(l1.GetNumActors() > 0) Vector Park = l1.GetActor(0)->GetPosition(); if (v.HasCommand(DUMMY_VCALLED)) v.RemoveCommand(DUMMY_VCALLED); if(StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE01) == 0 || StrCompare(v.GetPrototypeFileName(), OBJ_ENGINE02) { v.PushActionWait(ACTION_APPEND, 10.0f); v.PushActionMove(ACTION_APPEND, Park); v.PushActionWait(ACTION_APPEND, 0.5f); PersonList passengers = v.GetPassengers(); if (passengers.GetNumPersons() > 0) v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_SUBSTATION, Caller, 0, false); } }}; Quote Link to comment Share on other sites More sharing options...
Guest Stukov Posted August 16, 2008 Report Share Posted August 16, 2008 Thanks, but it didn't. I tried removing or even adding them out of desperation, but that didn't work Quote Link to comment Share on other sites More sharing options...
anto.fra88 Posted August 16, 2008 Report Share Posted August 16, 2008 Thanks, but it didn't. I tried removing or even adding them out of desperation, but that didn't workah ok :( I put hours to read the code doma do I see it, however, there was a parenthesis in + Quote Link to comment Share on other sites More sharing options...