Jump to content
Xplorer4x4

Script Error

Recommended Posts

Define there? As in in the script? In the fire house? In the script it appears on lines 49,461 and 890. It appears/spawns in FS2 as well.

New problem though. EM4 doesnt report any errors, but none of the vehichles can return to the FS. It always says theres no space even if there is, except on Engine 17(aka OBJ_ENGINE017), it reports it does not belong in the FS.

Heres the newest script:

http://pastebin.com/JfYcNSXN

EDIT: thanks anyways maff, but I got the script 100% working now! Thanks anyways!

EDIT2: Spoke to soon, ALS Engines dont return to FS1 and Engine 17 doesnt enter its bay. It stop outside the middle bay at FS2 where it belongs but will not enter the station.

http://pastebin.com/51AgWYEr

Link to comment
Share on other sites

Thanks anyways, hopefully Hoppah or some one can help me out because this is bashing my head in because I cant see anything wrong at all. Checked the brackets, tried basing it off code for the other engines, tried, well a number of things and just cant get it!

So here are my latest alterations in an attempt to fix this before I go insane:

http://pastebin.com/sGFzFc7N

Now im off to bed :P

Link to comment
Share on other sites

I found the problem. That script checks the prototype of the object that executes the command. If the prototype matches any of the prototypes it compares to, the script continues. If it doesn't the following hint will be played: "This vehicle doesn't belong in the fire station!". The code of the hint should be the last part of the script as it needs to check all the prototypes before that. The code responsible for your problem is this:

		{
Mission::PlayHint(HINT_NOTVALID);
return;
}

I found the code three times while you need it only once at the end of the script. I removed the wrong parts and uploaded the script.

To make it more clear. The script basically does this

if caller matches proto1 then continue

else if caller matches proto2 then continue

else if caller matches proto3 then continue

else if caller matches proto4 then continue

else if caller matches proto5 then continue

else if caller matches proto6 then continue

else play hint (-> means caller doesn't matches any of the 6 protos above)

Yours did this

if caller matches proto1 then continue

else if caller matches proto2 then continue

else if caller matches proto3 then continue

else if caller matches proto4 then continue

else play hint

else if caller matches proto5 then continue

else play hint

else if caller matches proto6 then continue

else play hint

That means the proto5 and proto6 parts could not be executed anymore because the code already ended at 'else play hint', so 'else if' after that wouldn't work. That caused your problem. Anyway, the fixed script is in the attachment. I didn't test it.

Hoppah

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...