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
Combine Items [SOLVED]
Phoroneus Offline
Member

Posts: 141
Threads: 12
Joined: Feb 2011
Reputation: 0
#1
Combine Items [SOLVED]

After finding a decent resource here:
http://www.frictionalgames.com/forum/thread-4593.html
and a similar (and yet-unanswered) question here:
http://www.frictionalgames.com/forum/thread-5127.html

I'm left asking:
How do inventory.hps files work? I'm attempting to set up a combination of two items and while I've reached the point at which the items no longer complain that they cannot be combined, they're not removed and I'm not given the combination item.

After much fiddling and brute-force trial-and-error attempts, I've set everything back to the way it "should" be (imitating the original inventory.hps and map.hps files) and am rewarded with nothing more than the lack of an error message when trying to combine.

Recompiling the script and .lang files gives the error:
Script output for Inventory
main(13, 28) : ERR : Unexpected end of file

This is my inventory file in full (don't worry it's short). Anyone see any typos or anything I might've missed that would bring the wrath of the error gods down on me?
Spoiler below!
//Level 00 - Entryway//
//Combine ember and fuel//
void CombineTrashcan(string &in asItemA, string &in asItemB)
{
    AddPlayerSanity(10);
    RemoveItem(asItemA); RemoveItem(asItemB);
    GiveItem("LitBucket", "Puzzle", "metal_bucket_lit", "metal_bucket_lit.tga", 0);
    AddDebugMessage("Combined items!", false);
}
//////////////////////////

void OnGameStart()
{
    AddCombineCallback("emberandpaper", "EmberBucket", "ScrapPaper", "CombineTrashcan", false);
}


EDIT: I found the problem. It turned out I was editing a copy of the inventory file rather than the one inside my custom_stories/story_name/maps/ folder. Also I used two different names for the same combination, which I've fixed in my code above.

[Image: at_9365860.png]

Follow Harvest.
(This post was last modified: 02-02-2011, 07:14 AM by Phoroneus.)
02-02-2011, 04:16 AM
Find


Messages In This Thread
Combine Items [SOLVED] - by Phoroneus - 02-02-2011, 04:16 AM
RE: Combine Items [SOLVED] - by jens - 02-02-2011, 07:07 AM
RE: Combine Items [SOLVED] - by Phoroneus - 02-02-2011, 07:13 AM



Users browsing this thread: 1 Guest(s)