paulo ve Posted November 12, 2013 Report Share Posted November 12, 2013 error not pull the car!Help Scritp. object gf_winde : CommandScript{gf_winde(){SetIcon("winde");SetCursor("winde");SetGroupID(windegroup);SetGroupLeader(true);} bool CheckGroupVisibility(GameObject *Caller) {bool ok=Caller->IsChildEnabled("winde");return ok;} bool CheckTarget(GameObject *Caller, Actor *Target, int childID){Vehicle o(Target);bool ok=(o.IsFlagSet(OF_RECOVERABLE) && Caller->GetID()!=Target->GetID());if (Target->GetType()==ACTOR_VEHICLE)ok=ok && !o.HasEnclosedPerson();return ok;} void PushActions(GameObject *Caller, Actor *Target, int childID){gf_tec::winde_installieren (Caller, Target, childID);}}; object gf_winde_stop : CommandScript{ Actor a; gf_winde_stop(){SetIcon("winde_stop");SetCursor("winde_stop");SetGroupID(windegroup);SetGroupLeader(false);SetPriority(100);} bool CheckGroupVisibility(GameObject *Caller) {bool ok=!Caller->IsChildEnabled("winde");if (ok) {a=Game::GetActor(Caller->GetUserData());Vehicle v(&a);ok=v.IsMoving() && v.IsPulling();}return ok;} bool CheckTarget(GameObject *Caller, Actor *Target, int childID){bool ok=true; // Target->GetID()!=Caller->GetID();return ok;} void PushActions(GameObject *Caller, Actor *Target, int childID){Vehicle v(&a);v.PushActionWait (ACTION_NEWLIST,0.1); }}; object gf_winde_pull : CommandScript{ Actor a; gf_winde_pull(){SetIcon("winde_zug");SetCursor("winde_zug");SetGroupID(windegroup);SetGroupLeader(false);SetPriority(100);} bool CheckGroupVisibility(GameObject *Caller) {bool ok=!Caller->IsChildEnabled("winde");if (ok) {a=Game::GetActor(Caller->GetUserData());Vehicle v(&a);ok=!v.IsMoving() && v.IsPulling();}return ok;} bool CheckTarget(GameObject *Caller, Actor *Target, int childID){bool ok=Target->GetID()!=Caller->GetID();return ok;} void PushActions(GameObject *Caller, Actor *Target, int childID){gf_tec::rausziehen (Caller,Target);}}; object gf_winde_weg : CommandScript{ gf_winde_weg(){SetIcon("winde");SetCursor("winde");SetGroupID(windegroup+1);SetGroupLeader(false);SetPriority(100);SetRestrictions(RESTRICT_SELFEXECUTE);} bool CheckGroupVisibility(GameObject *Caller) {bool ok=!Caller->IsChildEnabled("winde");if (ok) {Actor a=Game::GetActor(Caller->GetUserData());Vehicle v(&a);ok=!v.IsMoving() && v.IsPulling();}return ok;} bool CheckTarget(GameObject *Caller, Actor *Target, int childID){bool ok=Caller->GetID()==Target->GetID();return ok;} void PushActions(GameObject *Caller, Actor *Target, int childID){ gf_tec::winde_abbauen (Caller);}}; Quote Link to comment Share on other sites More sharing options...
Stan Posted November 12, 2013 Report Share Posted November 12, 2013 Does it display any error? Where's the script from? Quote Link to comment Share on other sites More sharing options...
paulo ve Posted November 12, 2013 Author Report Share Posted November 12, 2013 Does it display any error? Where's the script from?error and SetGroupID (windegroup 1);?? Quote Link to comment Share on other sites More sharing options...
Hoppah Posted November 14, 2013 Report Share Posted November 14, 2013 windegroup must point to an integer, which is simply a digit such as 27 or whatever GroupID is not being used by the same caller (in other scripts) yet. Right now windegroup is not defined at all, so that results in an error. Add the following line on top of the script:int windegroup = 27;That should solve the error you wrote in your last post. Other than that, I have no idea what the script is supposed to do since there is no explanation. And because you didn't put the script in the code tags it's nearly unreadable as well. I'm guessing the script won't do anything. Quote Link to comment Share on other sites More sharing options...