WestSideRailways
Active member
Yes it does....I discovered an error in my original code while looking at something else this morning:Vehicle[] LocoList;
should beVehicle[] LocoList = new Vehicle[0];
, assuming that I got the syntax correct.
Speaking of syntax, I notice that you have removed the semicolon from the SetCamera line. Is there a reason for this? I also note unbalanced braces; you need an additional close-brace at the end. Unfortunately, I`m a bit unclear on exactly where close-braces need semicolons and where they are forbidden.
Additionally, to operate the rule, the class will require an Init(Asset) method; for something this simple, renaming FocusRandomLoco should suffice.
Don`t forget to tell the config.txt file which script file and what class are required. It won`t work if you forget.
That`s about all I can think of at this time; I have no idea why it doesn`t like the function header. I`ll check back later to see how this is working out for you.
That quote does seem to apply here, doesn`t it?
Thanks for the reply, will do some more . Did not even notice the missing semicolon and the braces.... will have to check those.
Have a appointment later on, so can't do much at the moment. Maybe later
Last edited: