The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Script problem. ( Unexpected End of File)
Nikson. Offline
Member

Posts: 134
Threads: 22
Joined: Feb 2013
Reputation: 4
#1
Script problem. ( Unexpected End of File)

I've been testing out switch case Statements to make random scares.
I've used this tutorial: https://wiki.frictionalgames.com/hpl2/tu...dom_scares

And I get a Unexpected End of File error. (Yes I know I haven't put anything in the cases.)
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Scare", true, 1);
}


void PlrCollideSwitch(string &in asParent, string &in asChild, int alState)
{
    int x = RandInt(1, 5)
    switch(x)
{
    case 1:
        //Scare 1
            break;
    case 2:
        //Scare 2
            break;
    case 3:
        //Scare 3
            break;
    case 4:
        //Scare 4
            break;
    case 5:
        //Scare 5
            break;
}

[Image: fnaf3_by_maybeanothercat-d8flfz4.gif]
12-22-2014, 11:26 PM
Find


Messages In This Thread
Script problem. ( Unexpected End of File) - by Nikson. - 12-22-2014, 11:26 PM



Users browsing this thread: 1 Guest(s)