JediHutch61 Posted July 12, 2010 Report Share Posted July 12, 2010 If someone can point out where I screwed up in my FS script I would really appreciate it. I am trying to get PD parking spaces with out maing changes to my FD spots. I did some buchtering off of Shane's scripts.Here is the scriptFirestation.zip Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted July 12, 2010 Report Share Posted July 12, 2010 If you give some details i should be able to help you but I need to know exactly what your trying to do, and exactly what the problem is. Quote Link to comment Share on other sites More sharing options...
JediHutch61 Posted July 12, 2010 Author Report Share Posted July 12, 2010 If you give some details i should be able to help you but I need to know exactly what your trying to do, and exactly what the problem is.I took the map and scripts from Shane's mod and adjusted the units accordingly. Then I copied and pasted the PD and AMR parts of the Firestation script in to my FS script, did the same with firestation start script. Then tried to run it. I got and fixed the first error, then I got a second error that I can not find. I've attached my logfile. ThanksLogfile.zip Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted July 13, 2010 Report Share Posted July 13, 2010 ?(_LAFireStation8fc37): Error: Unexpected EOF G__exec_statement()?(_LAFireStation8fc37): FILE:mod:/scripts/game/command/LAFireStation.script8fc37 LINE:2616?(_LAFireStation8fc37): Advice: You may need to use +P or -p option?Could not load script mod:/scripts/game/command/LAFireStation.script?(_LAFireStation8fc37): Error: Symbol this_definitely_is_an_evil_workaround_4709_2303 is not defined in current scope ?(_LAFireStation8fc37): FILE: LINE:0?(_LAFireStation8fc37): !!!Dictionary position rewound... ?(_LAFireStation8fc37): !!!Error recovered!!!!WARNING: global listener object is still registered! Unregister listener before destroying object!Post the Firestation script again(the updated one) or use something like Notepad2 to view the file. It will number each line so you can easily find line 2616.Perhaps it would be better to use shanes scripts and simply comment out the parts you dont need(by comment out I mean do this: /* where you want to start skipping code and add */ where you want the game to start reading the script again. Quote Link to comment Share on other sites More sharing options...
JediHutch61 Posted July 13, 2010 Author Report Share Posted July 13, 2010 Post the Firestation script again(the updated one) or use something like Notepad2 to view the file. It will number each line so you can easily find line 2616.Perhaps it would be better to use shanes scripts and simply comment out the parts you dont need(by comment out I mean do this: /* where you want to start skipping code and add */ where you want the game to start reading the script again.The firestation script I posted was the only one I have made, no update. I just put in to the Notepad 2 as suggested and there is no line 2616. Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted July 13, 2010 Report Share Posted July 13, 2010 Ahh now were getting some where. First, sorry i misunderstood the earlier post. Secondly, ok in that case, open the file in notepad2 again. When you click a { or a } bracket it will light up red. You may need to look slowly and carefully but another red bracket will show up to. This shows you where the statement opens and closes. You either have an extra bracket, or your missing one. Let me know if that helps any. Quote Link to comment Share on other sites More sharing options...
craig141 Posted July 14, 2010 Report Share Posted July 14, 2010 You gotif (v.GetVehicleType() == OBJ_EMS) { for(int i=0; i < gate08a.GetNumObjects(); i++) { GameObject *gate = gate08a.GetObject(i); Actor *vogate = vogate08a.GetActor(i); Vector GateSnd = gate->GetPosition(); if (gate->GetUserData() == 0) { gate->SetUserData(1); gate->SetAnimation(ANI_OPEN); vogate->SetVirtualObjectTerrain(VOSET_ROAD); Audio::PlaySample3D(SND_GATE, GateSnd); } else { gate->SetUserData(0); gate->SetAnimation(ANI_CLOSE); vogate->SetVirtualObjectTerrain(VOSET_BARRICADE); Audio::PlaySample3D(SND_GATE, GateSnd); } } }When you need to haveif (StrCompare(v.GetPrototypeFileName(), OBJ_EMS) ==0){ for(int i=0; i < gate08a.GetNumObjects(); i++) { GameObject *gate = gate08a.GetObject(i); Actor *vogate = vogate08a.GetActor(i); Vector GateSnd = gate->GetPosition(); if (gate->GetUserData() == 0) { gate->SetUserData(1); gate->SetAnimation(ANI_OPEN); vogate->SetVirtualObjectTerrain(VOSET_ROAD); Audio::PlaySample3D(SND_GATE, GateSnd); } else { gate->SetUserData(0); gate->SetAnimation(ANI_CLOSE); vogate->SetVirtualObjectTerrain(VOSET_BARRICADE); Audio::PlaySample3D(SND_GATE, GateSnd); } } }I fixed it for you, see attachment Quote Link to comment Share on other sites More sharing options...
JediHutch61 Posted July 14, 2010 Author Report Share Posted July 14, 2010 (edited) Thanks I was looking at it for hours yeasterday and could not figure it out.I am still getting the line 2616 error. Edited July 14, 2010 by JediHutch61 Quote Link to comment Share on other sites More sharing options...
craig141 Posted July 14, 2010 Report Share Posted July 14, 2010 Ok try this I think I got it allFirestation.zip Quote Link to comment Share on other sites More sharing options...
Guest Francis Posted July 14, 2010 Report Share Posted July 14, 2010 What are lines 2610-2620? Quote Link to comment Share on other sites More sharing options...
JediHutch61 Posted July 14, 2010 Author Report Share Posted July 14, 2010 What are lines 2610-2620?Those are the end of the script, how ever there is no line 2616, the error has gone away but the game get loaded and atfer 3-5 min it drops to desk top. I have attached thelog file. Log2.zip Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted July 15, 2010 Report Share Posted July 15, 2010 Those are the end of the script, how ever there is no line 2616, the error has gone away but the game get loaded and atfer 3-5 min it drops to desk top. I have attached thelog file. Log2.zipFirst, please attach the log file directly. Txt files are allowed so its much easier then having to extract a zip to get to the log file to help you. Secondly at a glance the log file isnt reporting script errors, and I have looked over Craigs script pretty extensively and cant find any missing brackets, but no promises! Occasionally I have problems like this after making changes, and I find it helps to run ccleaner, so that may be worth a shot. Quote Link to comment Share on other sites More sharing options...
Guest Francis Posted July 15, 2010 Report Share Posted July 15, 2010 When it gives an error on a line that doesn't exists, it's because a curly brace is missing somewhere so it cannot execute the code without looping all the time, which means it will crash so the game prevents it. Quote Link to comment Share on other sites More sharing options...
JediHutch61 Posted July 16, 2010 Author Report Share Posted July 16, 2010 Well I'm not getting an error any more. I followed 4x4's advica, and have run ccleaner 4 time and cleared up every thing it recommended, just tried both the icon and the game routes to launch the mod, and it failed. I got the normal power up for the game right to the black screen for loading the mod, then it collaspes. the game crashes to desk top. any ideas? Here is the log file, logfile.txt Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted July 16, 2010 Report Share Posted July 16, 2010 Make sure you run the cleaner and registry cleaner. I think the registry cleaner is the important thing because I notice an e4p file extension pop up.Also, for the sake of testing, pop back in an unedited script for the one(s) you modified and check to see if the mod loads then. Quote Link to comment Share on other sites More sharing options...
JediHutch61 Posted July 18, 2010 Author Report Share Posted July 18, 2010 Make sure you run the cleaner and registry cleaner. I think the registry cleaner is the important thing because I notice an e4p file extension pop up.Also, for the sake of testing, pop back in an unedited script for the one(s) you modified and check to see if the mod loads then.Ok I got the game to run, after updating to v2.0.2, and redoing my scripts, to get Station 1 full no changes, Station 2 EMS supervisor, Engine 1, and HES. I gave up on the PD modding till I can get my game back together. Game loaded up from desktop and opens up normal til I got to the freeplay map. I have zipped the log file, the firestation script, the firestationstart script and the tofirestation script as these are the only ones I changed. I also included a screen of the problem.incident.zip Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted July 18, 2010 Report Share Posted July 18, 2010 Ok it looks to me like you altered the VO names in the editor and butchered them. It is the only reasonable explanation for whats going on here. Becuase for example you have:ActorList l16 = Game::GetActors(VO_AMBULANCE04); for(int i=0; i < l13.GetNumActors(); i++) { Vector Ambulance04 = l13.GetActor(0)->GetPosition(); Vehicle m = Game::CreateVehicle(OBJ_EMS, UNNAMED); m.EnableBlueLights(false); m.SetPosition(Ambulance04); m.SetRotation(gate8); m.UpdatePlacement(); m.SetMaxPassengers(2); m.SetMaxTransports(1); m.SetSpeed(12.0f); m.PushActionWait(ACTION_NEWLIST, 4.5f); m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 8, false); m.PushActionWait(ACTION_APPEND, 0.5f); m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 1, false); }Which is 100% correct. So the only explanation for this spawning in FS1 is you altered the VO location.Plus you have this:ActorList l10 = Game::GetActors(VO_LADDER); for(int i=0; i < l9.GetNumActors(); i++) { Vector Ladder = l9.GetActor(0)->GetPosition(); Vehicle m = Game::CreateVehicle(OBJ_LADDER, UNNAMED); //NOTE: Change OBJ_LADDER to OBJ_TILLER to replace the tower with the tiller m.EnableBlueLights(false); m.SetPosition(Ladder); m.SetRotation(gate3); m.UpdatePlacement(); m.SetMaxPassengers(6); m.SetSpeed(9.0f); m.PushActionWait(ACTION_NEWLIST, 1.4f); m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 3, false); m.PushActionWait(ACTION_APPEND, 0.5f); m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 3, false); }This is the correct code for the ladder to spawn in its normal bay, but you managed to make it spawn behind the ambulance.You seem to have your scripting right so there no other explanation. Start fresh but use these scripts with an unaltered map file freeplay.e4m or dfreeplay.e4m. Quote Link to comment Share on other sites More sharing options...
JediHutch61 Posted July 18, 2010 Author Report Share Posted July 18, 2010 Switched over to woods map, and tried to run the game. Same thing happend on woods map, btw I never touch my maps, I don't trust the editor. Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted July 18, 2010 Report Share Posted July 18, 2010 I had a feeling you would say that. I will double check the scripts tomorrow, but suffice to say, like I pointed out above, your scripts are correct from what I see so not much else I can figure out. Quote Link to comment Share on other sites More sharing options...
JediHutch61 Posted July 20, 2010 Author Report Share Posted July 20, 2010 I have gotten it to run and spawn everything it should. It took a total restart of the LA mod, but I got it. Now I have one Problem, I cannot get the LASD cv. It is the only vehicle that is missing. Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted July 20, 2010 Report Share Posted July 20, 2010 Load the editor and make sure you have the file in the prototypes listed, and make sure its not missing the model file.Also, it shouldnt be but check freeplaybase.xml or freeplaybase_d.xml for em4deluxe, and make sure its not disabled. Quote Link to comment Share on other sites More sharing options...
JediHutch61 Posted July 20, 2010 Author Report Share Posted July 20, 2010 Load the editor and make sure you have the file in the prototypes listed, and make sure its not missing the model file.Also, it shouldnt be but check freeplaybase.xml or freeplaybase_d.xml for em4deluxe, and make sure its not disabled.The files are all there and it is not disabled in the freeplaybase.xml Quote Link to comment Share on other sites More sharing options...
Xplorer4x4 Posted July 20, 2010 Report Share Posted July 20, 2010 Had a feeling you would say that..did you download the LA Mod before or after the recent forum problems? If it was after, then I would try clearing your cache and cookies and try again. If it still fails, then I suspect the file got corrupt during the crash/restore, and the only thing that will fix it is if Hoppah or some one can upload a new copy of the LA Mod to the server. Quote Link to comment Share on other sites More sharing options...