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
New to this, having some trouble
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#14
RE: New to this, having some trouble

(02-27-2013, 12:08 PM)DeAngelo Wrote:
(02-27-2013, 11:48 AM)No Author Wrote: Can you post the error ?
It's much easier to understand.

Sure, though I'm not sure if you mean the error from when I first tried to use the "setlightvisible" or the one from when you had me add the OnLeave bit.


main (39, 1): ERR :Identifier 'Void' is not a data type
main (32, 36: ERR :'True' is not declared
main (36, 36): ERR :'False' is not declared
main (39, 1): ERR :Identifier 'Void' is not a data type
main (40, 1): ERR :Not all paths return a value

The 2 ones about True and False started when I tried to to get the setlightvisible bit to work, the rest showed up when I added the OnLeave bit. For completion sake here is my script as it is at the moment I get the errors.
PHP Code: (Select All)
void OnStart() 

    
AddEntityCollideCallback("Player""PlayerCollide""MonsterFunction"true1); 
    
AddEntityCollideCallback("Player""PlayerCollide_Spotlight""SpotlightOn"true1);
    
AddEntityCollideCallback("Player""PlayerCollide_SpotlightOff""SpotlightOff"true1);    
    
AddEntityCollideCallback("Player""PlayerCollide_key1""WallChange1"true1); 
    
AddUseItemCallback("""Key_AlcDoor""AlcDoor""UsedKeyOnAlcDoor"true);    


void MonsterFunction(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_grunt_1"true); 
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_1"2"");
    
}

void UsedKeyOnAlcDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("AlcDoor"falsetrue);
    
PlaySoundAtEntity("""unlock_door.snt""AlcDoor"0.0ftrue);
    
RemoveItem("Key_AlcDoor");
}

void WallChange1(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("Key1disappear_*",false);
    
SetEntityActive("Key1appear_*",true);
}

void SpotlightOn(string &in asParentstring &in asChildint alState)
{
    
SetLightVisible("Spotlight_4"True); 
}
void SpotlightOff(string &in asParentstring &in asChildint alState)
{
    
SetLightVisible("Spotlight_4"False); 
}

Void OnLeave()
{
///Other scripts


First, don't fill anything on the void OnLeave if you don't want to add the script now.
Second, don't use caps on the first letter on the true and false. It should be :
PHP Code: (Select All)
void SpotlightOn(string &in asParentstring &in asChildint alState)
{
    
SetLightVisible("Spotlight_4"true); 
}
void SpotlightOff(string &in asParentstring &in asChildint alState)
{
    
SetLightVisible("Spotlight_4"false); 

Third, Void OnLeave should be void OnLeave.

[Image: the-cabin-in-the-woods-masked-people.jpg]
02-27-2013, 01:09 PM
Find


Messages In This Thread
New to this, having some trouble - by DeAngelo - 02-27-2013, 07:23 AM
RE: New to this, having some trouble - by NaxEla - 02-27-2013, 07:40 AM
RE: New to this, having some trouble - by NaxEla - 02-27-2013, 08:51 AM
RE: New to this, having some trouble - by NaxEla - 02-27-2013, 09:36 AM
RE: New to this, having some trouble - by No Author - 02-27-2013, 01:09 PM
RE: New to this, having some trouble - by NaxEla - 03-02-2013, 10:05 AM



Users browsing this thread: 1 Guest(s)