The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help Fatal Error on this script
jtylerg Offline
Junior Member

Posts: 4
Threads: 2
Joined: Aug 2012
Reputation: 0
#1
Fatal Error on this script

All that is on this script is 2 keys which open 2 different doors (Basementkey_1, which opens mansion_1... and startkey, which opens cabinet_1) when i go to start the game it crashes with a fatal error saying "main 15,1 : ERR Unexpected Token '{'

Any fixes or ideas of why this happens? (the code starts on line 1, it's just messed up on here for some reason... also, before i added startkey and cabinet_1 codes... Basementkey_1 and mansion_1 worked perfectly fine)


  1. ////////////////////////////
  2. // Run when entering map
  3. void OnStart()
  4. {
  5. AddUseItemCallback("", "BasementKey_1", "mansion_1", "UsedKeyOnDoor", true);
  6. }
  7. void UsedKeyOnDoor(string &in asItem, string &in asEntity)
  8. {
  9. SetSwingDoorLocked("mansion_1", false, true);
  10. PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
  11. RemoveItem("BasementKey_1");
  12. }
  13. {
  14. AddUseItemCallback("", "startkey", "cabinet_1", "UsedKeyOnDoor", true);
  15. }
  16. void UsedKeyOnDoor(string &in asItem, string &in asEntity)
  17. {
  18. SetSwingDoorLocked("cabinet_1", false, true);
  19. PlaySoundAtEntity("", "unlock_door", "cabinet_1", 0, false);
  20. RemoveItem("startkey");
  21. }
  22. ////////////////////////////
  23. // Run when leaving map
  24. void OnLeave()
  25. {
  26. }
08-15-2012, 04:07 PM
Find


Messages In This Thread
Fatal Error on this script - by jtylerg - 08-15-2012, 04:07 PM
RE: Fatal Error on this script - by Adny - 08-15-2012, 04:19 PM
RE: Fatal Error on this script - by Ongka - 08-15-2012, 04:19 PM
RE: Fatal Error on this script - by jtylerg - 08-16-2012, 06:44 PM
RE: Fatal Error on this script - by Ongka - 08-16-2012, 07:00 PM
RE: Fatal Error on this script - by jtylerg - 08-16-2012, 08:44 PM
RE: Fatal Error on this script - by Adny - 08-16-2012, 07:16 PM



Users browsing this thread: 1 Guest(s)