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 Crashes The Game
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#8
RE: Script Crashes The Game

(03-11-2014, 03:15 PM)Amn Wrote: Take a look at line #6 below

PHP Code: (Select All)
1  void RunSteamFlow(int alEventCount){
2      int iSteamArea RandInt(16);
3      int RunCount alEventCount;
4      for(int i=1;i<=6;i++)
5          if(iSteamArea == GetLocalVarInt("iBlockedSteamArea_"+i)){
6              RunSteamFlow(RunCount);        <-- Calling itself
7          
}
8          else{
9              SteamEvent(iSteamArea);
10             SetLocalVarInt("iBlockedSteamArea_"+alEventCount11 iSteamArea);
12         }
13 

Shouldn't that be SteamEvent( RunCount ) ?
Cause right now, as you know, that could cause an infinite loop and crash the game.

No. That if-statement is only true if iSteamArea becomes the same number as it's been before, to prevent the SteamEvent function to apply to the same area several times during one SteamRun function. It simply generates a new value for the iSteamArea integer until it gets one that hasn't been used already.

I guess it ultimately could become an infinite loop, but it should eventually hit every number. Is this a real problem though?

(03-11-2014, 03:12 PM)Mudbill Wrote:
(03-11-2014, 01:54 PM)Wapez Wrote: ERROR: Couldn't create script '/main/global.hps'
ERROR: Global script '/main/global.hps' could not be created!

This tells me there's another issue in your global.hps script. Since you used local variables for the script you posted as well as OnStart/OnEnter etc, that must mean it's from a map's .hps file. Perhaps post your global.hps?

I don't have a global.hps yet, as one is not needed for the scripts I've been working on. It won't help this script either.

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
(This post was last modified: 03-11-2014, 03:41 PM by Wapez.)
03-11-2014, 03:40 PM
Find Reply


Messages In This Thread
Script Crashes The Game - by Wapez - 03-11-2014, 01:54 PM
RE: Script Crashes The Game - by PutraenusAlivius - 03-11-2014, 02:34 PM
RE: Script Crashes The Game - by Wapez - 03-11-2014, 02:39 PM
RE: Script Crashes The Game - by PutraenusAlivius - 03-11-2014, 02:43 PM
RE: Script Crashes The Game - by Wapez - 03-11-2014, 02:57 PM
RE: Script Crashes The Game - by Mudbill - 03-11-2014, 03:12 PM
RE: Script Crashes The Game - by Daemian - 03-11-2014, 03:15 PM
RE: Script Crashes The Game - by Wapez - 03-11-2014, 03:40 PM
RE: Script Crashes The Game - by Mudbill - 03-11-2014, 09:09 PM
RE: Script Crashes The Game - by Daemian - 03-12-2014, 01:22 AM
RE: Script Crashes The Game - by Mudbill - 03-13-2014, 09:27 PM
RE: Script Crashes The Game - by Wapez - 03-14-2014, 08:54 AM
RE: Script Crashes The Game - by Mudbill - 03-14-2014, 02:59 PM
RE: Script Crashes The Game - by Wapez - 03-14-2014, 03:56 PM
RE: Script Crashes The Game - by Apfel - 03-14-2014, 04:35 PM
RE: Script Crashes The Game - by Wapez - 03-14-2014, 04:42 PM
RE: Script Crashes The Game - by Apfel - 03-14-2014, 05:31 PM
RE: Script Crashes The Game - by Wapez - 03-14-2014, 05:36 PM
RE: Script Crashes The Game - by Mudbill - 03-14-2014, 05:49 PM



Users browsing this thread: 1 Guest(s)