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
How do i make the Sanity script?
Clear Offline
Junior Member

Posts: 19
Threads: 4
Joined: May 2012
Reputation: 0
#12
RE: How do i make the Sanity script?

(05-25-2012, 03:01 PM)Putmalk Wrote: (14, 1) refers to line 14, character 1.

In this case, you are misusing the "{" "}". They cannot be floating around there. May I suggest reviewing a basic scripting tutorial, as syntax errors like these will stop you from doing anything.

When utilizing those brackets, they have to be after a function.

Like:
void OnStart()
{

}

Alternatively, after an if-else statement:

if(whatever)
{

}
else
{

}

or a loop

for(int i=0;i<5;i++)
{

}

So, specifically, your error is right here:
{

AddEntityCollideCallback("Player", "Sanity1", "SanityDamage", true, 1);

}

Just shift that into the original void OnStart(), so it looks like
void OnStart()
{
AddUseItemCallback("", "key1", "DoorName01", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "Sanity1", "SanityDamage", true, 1);
}

And remove that line plus the brackets where you had it.


IT WORKED! I WANNA GIVE YOU A HUG AND I WANNA HUMP YOU AND I.... I mean, *cough* thank you kind sir.
05-25-2012, 03:14 PM
Find


Messages In This Thread
How do i make the Sanity script? - by Clear - 05-25-2012, 01:50 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 01:54 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 02:00 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 02:34 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 02:44 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 02:51 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 03:03 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 03:04 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 03:01 PM
RE: How do i make the Sanity script? - by Clear - 05-25-2012, 03:14 PM
RE: How do i make the Sanity script? - by Putmalk - 05-25-2012, 03:18 PM



Users browsing this thread: 1 Guest(s)