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
Scripting error
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#11
RE: Scripting error

Did you use my script? I told you that the "true" (without quotations) in AddUseItemCallback("", "deurkey_1", "deur", "UsedKeyOnDoor", True); was capitalized (spelling). And what is SetLightVisible(string& asLightName, bool abVisible); doing there? Same thing I told you, in RemoveItem("deurkey_1"); you don't have the quotations. Use this:


Quote:void OnStart()
{
AddUseItemCallback("", "deurkey_1", "deur", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "doorclose", "Collidedeur", true, 1);
}
void doorclose(string &in asParent, string &in asChild, int alState) ;
{
SetSwingDoorLocked("deur", true, false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity) ;
{
SetSwingDoorLocked("deur", false, true);
PlaySoundAtEntity("", "unlock_door", "deur", 0, false);
RemoveItem("deurkey_1");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}

12-22-2011, 02:54 PM
Find
viccie Offline
Junior Member

Posts: 7
Threads: 1
Joined: Dec 2011
Reputation: 0
#12
RE: Scripting error

(12-22-2011, 02:54 PM)flamez3 Wrote: Did you use my script? I told you that the "true" (without quotations) in AddUseItemCallback("", "deurkey_1", "deur", "UsedKeyOnDoor", True); was capitalized (spelling). And what is SetLightVisible(string& asLightName, bool abVisible); doing there? Same thing I told you, in RemoveItem("deurkey_1"); you don't have the quotations. Use this:


Quote:void OnStart()
{
AddUseItemCallback("", "deurkey_1", "deur", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "doorclose", "Collidedeur", true, 1);
}
void doorclose(string &in asParent, string &in asChild, int alState) ;
{
SetSwingDoorLocked("deur", true, false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity) ;
{
SetSwingDoorLocked("deur", false, true);
PlaySoundAtEntity("", "unlock_door", "deur", 0, false);
RemoveItem("deurkey_1");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
I now copy/pasted yours but yet another error
now it's again an ''unexpected token "{" '' at (7,2) and (11,2)


12-22-2011, 06:50 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#13
RE: Scripting error

(12-22-2011, 06:50 PM)viccie Wrote:
(12-22-2011, 02:54 PM)flamez3 Wrote: Did you use my script? I told you that the "true" (without quotations) in AddUseItemCallback("", "deurkey_1", "deur", "UsedKeyOnDoor", True); was capitalized (spelling). And what is SetLightVisible(string& asLightName, bool abVisible); doing there? Same thing I told you, in RemoveItem("deurkey_1"); you don't have the quotations. Use this:


Quote:void OnStart()
{
AddUseItemCallback("", "deurkey_1", "deur", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "doorclose", "Collidedeur", true, 1);
}
void doorclose(string &in asParent, string &in asChild, int alState) ;
{
SetSwingDoorLocked("deur", true, false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity) ;
{
SetSwingDoorLocked("deur", false, true);
PlaySoundAtEntity("", "unlock_door", "deur", 0, false);
RemoveItem("deurkey_1");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
I now copy/pasted yours but yet another error
now it's again an ''unexpected token "{" '' at (7,2) and (11,2)
Didn't I already tell you that you have a ; on the end of
void UsedKeyOnDoor(string &in asItem, string &in asEntity). And same deal here
void UsedKeyOnDoor(string &in asItem, string &in asEntity). Get rid of the ;'s. Hopefully that will work.


12-22-2011, 07:46 PM
Find
viccie Offline
Junior Member

Posts: 7
Threads: 1
Joined: Dec 2011
Reputation: 0
#14
RE: Scripting error

(12-22-2011, 07:46 PM)flamez3 Wrote:
(12-22-2011, 06:50 PM)viccie Wrote:
(12-22-2011, 02:54 PM)flamez3 Wrote: Did you use my script? I told you that the "true" (without quotations) in AddUseItemCallback("", "deurkey_1", "deur", "UsedKeyOnDoor", True); was capitalized (spelling). And what is SetLightVisible(string& asLightName, bool abVisible); doing there? Same thing I told you, in RemoveItem("deurkey_1"); you don't have the quotations. Use this:


Quote:void OnStart()
{
AddUseItemCallback("", "deurkey_1", "deur", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "doorclose", "Collidedeur", true, 1);
}
void doorclose(string &in asParent, string &in asChild, int alState) ;
{
SetSwingDoorLocked("deur", true, false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity) ;
{
SetSwingDoorLocked("deur", false, true);
PlaySoundAtEntity("", "unlock_door", "deur", 0, false);
RemoveItem("deurkey_1");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
I now copy/pasted yours but yet another error
now it's again an ''unexpected token "{" '' at (7,2) and (11,2)
Didn't I already tell you that you have a ; on the end of
void UsedKeyOnDoor(string &in asItem, string &in asEntity). And same deal here
void UsedKeyOnDoor(string &in asItem, string &in asEntity). Get rid of the ;'s. Hopefully that will work.

IT WORKS Big Grin
thank you so much everyone!!!

12-22-2011, 08:03 PM
Find




Users browsing this thread: 2 Guest(s)