Jump to content
Guest Terminator5665

LaFirestation.script help

Recommended Posts

Guest Terminator5665

Hi,

I'm using the shane green's submod, i want to add a few more vehicles to the police station.

I have basic knowledge of scripting, but i am a bit confused why i keep getting an error (sorry if its something silly).

I added a new VO in the editor and changed the constants at the top of the script to correspond correctly as i am added a slick top unit.


ActorList 148 = Game::GetActors(VO_LAPDSLICK);
for(int i=0; i < 148.GetNumActors(); i++)
{

Vector Lapdslick = 148.GetActor(0)->GetPosition();
Vehicle m = Game::CreateVehicle(OBJ_LAPDSLICK, UNNAMED);
m.EnableBlueLights(false);
m.SetPosition(Lapdslick);
m.UpdatePlacement();
m.SetMaxPassengers(2);
m.SetMaxTransports(2);
m.SetSpeed(12.0f);
m.PushActionWait(ACTION_NEWLIST, 2.0f);
m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 11, false);
m.PushActionWait(ACTION_APPEND, 0.5f);
m.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 11, false);
}

I added this after the last vehicle to be spawned which was 147. When i start it with the game it says that the 148 is an illegal operation.

What does the 148 reference to and why is it giving me an error?

Thanks in advanced for any help

p.s. i attached the full script to this post

Link to comment
Share on other sites

Guest Francis

A variable cannot be named as a number. If you look closely, the variables used as ActorLists here are "l##", which is a small L. :) Replace 148 with l48 and you'll be fine. You must change three lines, the first ones, not including the brace.

Link to comment
Share on other sites

Guest Terminator5665

One more thing, how do i make a command that i created via script show up in the editor? I tried the assign command button but there's no where to choose what script it goes to...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...