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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom story crash
Author Message
goalreadymc Offline
Member

Posts: 55
Joined: Jul 2014
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Neelke Offline
Senior Member

Posts: 667
Joined: Apr 2013
Reputation: 26
Post: #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 all posts by this user Quote this message in a reply
goalreadymc Offline
Member

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

pssshshsh well im so stupid
09-13-2014 01:09 PM
Find all posts by this user Quote this message in a reply
Post Reply 


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

Please answer:



User(s) browsing this thread: 1 Guest(s)