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
Custom story crash
goalreadymc Offline
Member

Posts: 55
Threads: 23
Joined: Jul 2014
Reputation: 0
#1
Custom story crash

Hi,
I tried to code to get a book shelf to move and crashes.
FATAL ERROR: Could not load script file 'custom_stories/Wanted/maps/ch01/05.1_prison_office.hps'!
main (4, 13): ERR: Expression must be of boolean type
void MoveBookshelf(string &in asEntity, int alState)
{

        if (GetLocalVarInt("Check"))
        {
               if (alState == 1)
                {
                SetMoveObjectState("office_shelf", 1);
                PlaySoundAtEntity("", "quest_completed.snt", "office_shelf", 0, false);
                PlayMusic("01_puzzle_passage.ogg", false, 1.2, 0.7, 10, false);
                GiveSanityBoost();
              
                SetLocalVarInt("Check", 1);
  
                return;
                }
        }
}
09-13-2014, 01:53 AM
Find Reply
Neelke Offline
Senior Member

Posts: 669
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: Custom story crash

Sorry, wrong.

You don't have anything checking the value of the variable.

if(GetLocalVarInt("Check") == 1)

Derp.
(This post was last modified: 09-13-2014, 11:15 AM by Neelke.)
09-13-2014, 11:14 AM
Find Reply
goalreadymc Offline
Member

Posts: 55
Threads: 23
Joined: Jul 2014
Reputation: 0
#3
RE: Custom story crash

pssshshsh well im so stupid
09-13-2014, 01:09 PM
Find Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Human Verification
Please tick the checkbox that you see below. This process is used to prevent automated spam bots.



Users browsing this thread: 1 Guest(s)