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 So many errors
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#1
So many errors

I've managed to remove all the coding that had errors in it, but now I'm not quite sure how to write the function I want. The timers in the code (what I removed) was causing the error "main (11, 1): INFO: Compiling void Script_VisionTrigger(string&in, string&in, int)"
Where do I put the timers if I want them to run only when the player is in the specified area?

void OnStart()
{
    AddEntityCollideCallback("Player", "Area_VisionTrigger", "Script_VisionTrigger", false, 0);
}

void OnEnter()
{

}

void Script_VisionTrigger (string &in asParent, string &in asChild, int alState)
{
    if(alState == 1)
    {
        PlayMusic("vision_music", true, 1, 6, 7, false);
        CreateParticleSystemAtEntity("Area_VisionWind", "ps_dust_whirl.ps", "Area_VisionWind", false);
        SetLampLit("candlestick_floor_1", false, true);
        SetLampLit("candle_floor_small_1", false, true);
        PlaySoundAtEntity("blow", "general_wind_whirl", "Player", 0.0f, false);
        
        AddTimer("fadescreen", 18.1f, "timer_fade");
        AddTimer("visionstarter", 19.2f, "timer_vision_start");
        AddTimer("visionender", 203.53f, "timer_vision_end");
    }
    if(alState == -1)
    {
        StopMusic(3, 7);
    }
}

void OnLeave()
{

}

Edit: if it helps, I was trying to get the timers to fade the screen to black, then teleport the player to a second start area and fade back in, have the event play, then teleport him back.

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 02-10-2013, 10:46 PM by CarnivorousJelly.)
02-10-2013, 10:43 PM
Find


Messages In This Thread
So many errors - by CarnivorousJelly - 02-10-2013, 10:43 PM
RE: So many errors - by FlawlessHappiness - 02-10-2013, 11:13 PM
RE: So many errors - by CarnivorousJelly - 02-11-2013, 12:54 AM
RE: So many errors - by FlawlessHappiness - 02-11-2013, 07:48 AM
RE: So many errors - by CarnivorousJelly - 02-11-2013, 07:52 PM
RE: So many errors - by Adrianis - 02-11-2013, 08:55 PM
RE: So many errors - by CarnivorousJelly - 02-12-2013, 06:45 AM
RE: So many errors - by Adrianis - 02-11-2013, 11:22 AM
RE: So many errors - by FlawlessHappiness - 02-11-2013, 08:36 PM
RE: So many errors - by Adrianis - 02-12-2013, 06:14 PM
RE: So many errors - by CarnivorousJelly - 02-13-2013, 12:54 AM
RE: So many errors - by CarnivorousJelly - 02-14-2013, 05:23 AM
RE: So many errors - by TheGreatCthulhu - 02-14-2013, 01:23 PM



Users browsing this thread: 3 Guest(s)