timmiej93 Posted August 8, 2014 Report Share Posted August 8, 2014 Hey guys, So my game suddenly started freezing up just a few seconds after the freeplay game is loaded. No biggy you'd say, just check the log. But there is just no error reported, the game just quits.. How strange is that?Does anyone know more about this? Quote Link to comment Share on other sites More sharing options...
mariuswww Posted August 8, 2014 Report Share Posted August 8, 2014 Did you any new scripts etc? If so try and take them out and try it. Quote Link to comment Share on other sites More sharing options...
timmiej93 Posted August 8, 2014 Author Report Share Posted August 8, 2014 I edited one, and when I take that one out, it indeed works like normal.. It's just 700 lines, just got a good read ahead of me . Too bad it seems like there's nothing wrong with it ------ Now this is seriously getting strange...I narrowed the errors down to LAFireStation and LAFireStationStart, but they just don't make sense... I've put the default LAFireStation script back, moved my edited version out of the folder, and left my edited version of LAFireStationStart in it. When running the game, after about 15 seconds, I get this error:?(_LAFireStation8b572): Error: Symbol l1 is not defined in current scope ?(_LAFireStation8b572): FILE:mod:/scripts/game/command/LAFireStation.script8b572 LINE:1293?(_LAFireStation8b572): Error: Failed to evaluate l1.GetNumObjects()?(_LAFireStation8b572): Possible candidates are...?(_LAFireStation8b572): filename line:size busy function type and name ?(_LAFireStation8b572): ?(_LAFireStation8b572): !!!Dictionary position rewound... ?(_LAFireStation8b572): !!!Error recovered!!!?(_LAFireStation8b572): Error: Symbol l1 is not defined in current scope ?(_LAFireStation8b572): FILE:mod:/scripts/game/command/LAFireStation.script8b572 LINE:1293?(_LAFireStation8b572): Error: Failed to evaluate l1.GetNumObjects()?(_LAFireStation8b572): Possible candidates are...?(_LAFireStation8b572): filename line:size busy function type and name ?(_LAFireStation8b572): ?(_LAFireStation8b572): !!!Dictionary position rewound... ?(_LAFireStation8b572): !!!Error recovered!!!This refers to the default, unedited LAFireStation script, so I'm completely baffled why this is happening.. Any ideas about what's happening? Quote Link to comment Share on other sites More sharing options...
MikeyPI Posted August 8, 2014 Report Share Posted August 8, 2014 You modify the map that it runs with? Quote Link to comment Share on other sites More sharing options...
timmiej93 Posted August 8, 2014 Author Report Share Posted August 8, 2014 Yes I did, but in which way could that conflict with this script? Quote Link to comment Share on other sites More sharing options...
MikeyPI Posted August 8, 2014 Report Share Posted August 8, 2014 Quite simply, if you changed the vo's on the map and renamed them for example, or deleted some then the script won't function correctly anymore since it checks the map for said VOs/objects. Quote Link to comment Share on other sites More sharing options...
timmiej93 Posted August 8, 2014 Author Report Share Posted August 8, 2014 No I didn't edit it in that way, only added things. But still. The point it's referring to is an l1. If that didn't exist, an error should occur with l1 isn't greater then zero, since those all start with if(l1>0), simply put Quote Link to comment Share on other sites More sharing options...
MikeyPI Posted August 8, 2014 Report Share Posted August 8, 2014 You either renamed or deleted the control panel I bet, I just looked up the exact error location.. l1 is pointing towards an object missing on the map. Quote Link to comment Share on other sites More sharing options...
timmiej93 Posted August 8, 2014 Author Report Share Posted August 8, 2014 Nope, both controlpanels are still there, unfortunately. I wish it was that simple. Also ran checks on the names of the firestations, those weren't it either. Quote Link to comment Share on other sites More sharing options...
Hoppah Posted August 8, 2014 Report Share Posted August 8, 2014 l1 couldn't be defined because the caller (object that executes the script) isn't named 'fire_station', 'fire_station2', 'fire_station_controlpanel' or 'fire_station_controlpanel2'.If any other object tries to run that part of the script (commandscript 'DummyDisableAlarm') it will result in that particular crash. Quote Link to comment Share on other sites More sharing options...
timmiej93 Posted August 8, 2014 Author Report Share Posted August 8, 2014 This is getting weirder by the minute. Thanks for explaining everything guys, I appreciate the patience you have with me. I'll check everything again tomorrow's night, and I'll let you know Quote Link to comment Share on other sites More sharing options...
timmiej93 Posted August 9, 2014 Author Report Share Posted August 9, 2014 Aha, I got it.I added a simple logwrite saying "Not a firestation" like below, and indeed, two cases occur in the log and the game doesn't crash. Now I've gotta find out what is calling the Dummy then if(Caller->HasName(NAME_CONTROLPANEL) || Caller->HasName(NAME_FIRESTATION)) //= fire station 1 GameObjectList l1 = Game::GetGameObjects(NAME_FIRESTATION); else if(Caller->HasName(NAME_CONTROLPANEL2) || Caller->HasName(NAME_FIRESTATION2)) //= fire station 2 GameObjectList l1 = Game::GetGameObjects(NAME_FIRESTATION2); else System::Log("not a firestation"); return;-------------------- Alright, a small edit here:I commented out the parts I thought that were causing the problem, but the log still shows two lines saying not a firestation. I guess there isn't a method to identify the callers name right? So instead of Caller->HasName, something like Caller->FindName ? -------------------- Was cheering too early again.. Now that has been fixed, the game starts freezing after a few seconds again.This time though, I've been able to narrow it down to something very strange. The problem seems to be the spawning of engineers.When I disable the engineers spawning on startup, the techvans spawn perfectly, and everything works like it should. I also tried making the engineers pawn from a different VO, the same one where the battalion chief spawns from. Now, all 6 engineers spawn like they should and nothing seems wrong...Could it be that I'm using names in the editor or in the script that aren't according to the "rules" that the game uses? The VO is called "TT_spawn", in the script it's referred to as "VO_SPAWN_TT".Could this be the cause? Or a wrong setting for the VO? Or maybe a problem with the building-model? (The spawn VO is inside an open building, just like the Fire Station.) ---------------------- So, after placing the VO outside of the building, the engineers happily spawn.. does anyone have a clue why they refuse to spawn inside? PS. somewhere there's a big problem in this model or something, since I changed the code, so when l1 (the spawn vo) wouldn't fit the criteria, it should draw an error, but that error never showed up. Not ingame, not in the log. else if(v.IsCollidingWithVirtualObject(VO_SQUAD01_TT)) { ActorList l1 = Game::GetActors(VO_SPAWN_TT); if(l1.GetNumActors() > 0) { Vector Spawn = l1.GetActor(0)->GetPosition(); } else { Mission::PlayHint("Spawning problems"); System::Log("Spawning problems"); return; } } Quote Link to comment Share on other sites More sharing options...