Jump to content
Nickeltheredhusky

Problem script "ToHospital" for my mod

Recommended Posts

Hello everyone ! Nicekl reporting ! 

Ive started updated my mod and ive mixing some features of some "ToHospital" script  for add a radio message when a aptient is transported to hospital but when i clic on "GoToHospital" ive the message ive joint to this message and if ya can look what can maybe be wrong in the script taht can be helpful

 

Thank by advance

Nick' out !

Capture d'écran 2024-10-30 154336.png

LAToHospital.script

Link to comment
Share on other sites

On 10/30/2024 at 11:00 AM, Nickeltheredhusky said:

Hello everyone ! Nicekl reporting ! 

Ive started updated my mod and ive mixing some features of some "ToHospital" script  for add a radio message when a aptient is transported to hospital but when i clic on "GoToHospital" ive the message ive joint to this message and if ya can look what can maybe be wrong in the script taht can be helpful

 

Thank by advance

Nick' out !

Capture d'écran 2024-10-30 154336.png

LAToHospital.script 15.59 kB · 0 downloads

Hey nick, I'm taking a quick look at the script and I'm having trouble finding where you've made your edits. If you hit the middle button on that script error, it should tell you exactly which line of code is throwing the error. 

Link to comment
Share on other sites

On 11/7/2024 at 3:13 AM, The Loot said:

"soundID" isn't properly set up because you're missing a declaration of what it is.

You need the following somewhere before the first use of it: int soundID;

Just stick it at the top of the script with the constants.

What kind of declaration i need do ? the soundID is not the sound in .wav ?

 

Link to comment
Share on other sites

Actually, are those sounds supposed to be something repeating that follows the vehicle, or just something that just plays once when you execute the command?

If the latter, the whole soundID thing is unnecessary in the first place. You can actually just replace 

if(StrCompare(Caller->GetPrototypeFileName(), PROTO_UMH) == 0)
{
	soundID = Audio::PlaySample3D(SND_TOCHUMH, Caller->GetPosition());
	v.AttachSound(soundID);
}

with 

if(StrCompare(Caller->GetPrototypeFileName(), PROTO_UMH) == 0)
	Audio::PlaySample3D(SND_TOCHUMH, Caller->GetPosition());

and so forth with all the other protos.

If the former, like sirens, that's a larger process.

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