Frictional Games Forum (read-only)

Full Version: A bit confused. Help?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay so I scripted for a while, etc. And when I got to half, I though 'Hey, lets test it out!' But my game crashed and it displayed some weird errors I cannot seem to solve :c I would really appreciate if you could take a look and see what's wrong. Thanks!

This is the error it is displaying:

[Image: image211.png]


And this is the script:


Quote:void OnStart()
{
PlayMusic("04_amb.ogg", true, 0.3, 4, 1, true);
AddEntityCollideCallback("Player", "ScriptArea_1", "TimeToStartThisTrailerReally", true, 1);
}

void TimeToStartThisTrailerReally(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false); // Lolz you are gonna stay there for a while
PlaySoundAtEntity("GUARDIAN_MAAAAD", "guardian_activated.snt", "CreepyBitch", "3", false);
StartScreenShake(0.7, 11, 4, 4);
AddTimer("SomethingToDoWithSounds", 4, "SomeRocksFallDown");
}

void SomeRocksFallDown(string &in asTimer)
{
PlaySoundAtEntity("ROCKSPLOSION", "explosion_rock_large.snt", "Player", 0, false);
AddTimer("ICannotMakeUpNames", 0.1, "LETS_SPIN_THIS_SHIT");
}

void LETS_SPIN_THIS_SHIT(string &in asTimer)
{
PlaySoundAtEntity("HeartAttack", "react_pant.snt", "Player", 0, false);
StartPlayerLookAt("PlayerLooksBack", 0.3, 0, "");
AddTimer("", 0.4, "TurnBack");
}

void TurnBack(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("PlayerLooksFront", 0.3, 0, "");
AddTimer("", 0.3, "LookRight"
}

void LookRight(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("PlayerLooksRight", 0.4, 0, "");
AddTimer("", 0.2, "SighInRelief"
}

void SighInRelief(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("LookBack", 0.5, "");
PlaySoundAtEntity("Sigh", "react_breath_slow.snt", "Player", 0, false);
AddTimer("", 0.4, "WATCHOUT"
}

void WATCHOUT(string &in asTimer)
{
StopPlayerLookAt();
StartPlayerLookAt("PlayerLooksFront", 0.4, 0, "");
AddTimer("", 0.4, "TooLate");
}

void TooLate(string &in asTimer)
{

}

Thanks in advance!

Keep in mind this script is still WIP so yeah I am aware that last void is literally empty and serves no purpose.
you forgot ); at:
AddTimer("", 0.2, "SighInRelief"
AddTimer("", 0.4, "WATCHOUT"
AddTimer("", 0.3, "LookRight"

so make it:
AddTimer("", 0.2, "SighInRelief");
AddTimer("", 0.4, "WATCHOUT");
AddTimer("", 0.3, "LookRight");

and you have at:
PlaySoundAtEntity("GUARDIAN_MAAAAD", "guardian_activated.snt", "CreepyBitch", "3", false);

"3" should be just 3 so make it:
PlaySoundAtEntity("GUARDIAN_MAAAAD", "guardian_activated.snt", "CreepyBitch", 3, false);

I hope this helps Big Grin
Oh! How am I so stupid? Thanks! Big Grin
Now another error while doing that is bugging me Sad I haven't coded in a while so I must be really stupid about these now. Sorry!

Okay, Imagine all of those problems are fixed (can't be asked to paste the fixed code now) and lets look at this confusing error:

[Image: image212.png]


Got any ideas? Highly appreciated!
that's this part:
StartPlayerLookAt("LookBack", 0.5, "");

you forgot one part of the code/script you should have on more ""
you have it right in your other StartPlayerLookAt's
make it something like this:
StartPlayerLookAt("LookBack", 0.5, 0, "");

glad to help ;p
Oh my, thank you very much! Its fully working now! Smile
Just for the future, when it says it expected something look at the two numbers it give you. the first one is the vertical column, and the second is which character it is in that line.
by using the two coords along with what it was excepting you can usually figure it out.