jaghar7 Posted March 14, 2022 Share Posted March 14, 2022 (edited) So I guess I need a little help understanding something. I'm trying to get script A to call a function in script B. I can swear that it was working before but now the logs are saying the property can't be bound because the alias that has script B is 'not the right type'. In this scenario, both scripts reside on the same quest alias. Now I can't recall if I changed anything but I'm sure I didn't and it was working before. It's a hard thing to search on because all the search results are regular players posting their papyrus logs. I'm also not sure what other information is particularly relevant. 1: Do I need to move or otherwise put a copy of the target script in the quest's script tab and point the property to that? or2: Do I need to change the alias' fill type? I can't even be sure which 'type' the error is referring to. or3: Is there conceivably something else that might cause the "cannot be bound" cause of "not the right type". and/or4: Is there a potential code fix for this kind of thing? Or is it strictly a CK fix? I am testing this on a fresh game, properties are configured. Is there anything else specific anyone needs to know to provide me some insights on this? Side question: What reasons are there to place a script on an alias vs in the quest's script tab? I put my scripts on the alias as I don't need them to run anywhere else, but does it even matter? Thanks. Edited March 14, 2022 by jaghar7 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 14, 2022 Share Posted March 14, 2022 Scripts on an alias are used to either run events that can only be ran on an alias pointing to the player (i.e. OnPlayerLoadGame) or when one wants to interact with the object assigned to the alias (i.e. doing something when an item is added to an inventory or container). Scripts on the quest tab tend to be initialization events, maintenance functions, a place to hold properties and / or functions to be accessed by several stage fragments and / or dialog fragments. Alias quests can reference a script on the quest tab as well if necessary. As to your issue, without seeing the actual error message, the script in question and the record holding the script.... I would not begin to have an idea of where to start. Link to comment Share on other sites More sharing options...
jaghar7 Posted March 14, 2022 Author Share Posted March 14, 2022 (edited) As to your issue, without seeing the actual error message, the script in question and the record holding the script.... I would not begin to have an idea of where to start. I really don't think it's that complicated. Error: Property LootScript on script BB_BowenUpdate attached to alias Bowen on quest BB_BowenTravelQuest (AF02AB7C) cannot be bound because alias Bowen on quest BB_BowenTravelQuest (AF02AB7C) is not the right type. Cannot be bound is pretty common is it not? What IS the 'right type'? Ergo property is not being filled. Error: Cannot call SearchForLoot() on a None object, aborting function callstack:[alias Bowen on quest BB_BowenTravelQuest (AF02AB7C)].BB_BowenUpdate.OnUpdate() - "BB_BowenUpdate.psc" Line 185 Cow is had when trying to call said function. Hands are thrown up as the script is aborted and Bowen just stands around leaving me scratching my head. The only relevant parts of the script I can think of that wouldn't cause compile to file if they weren't... well I can't think of any. It's just property and calling the function. BB_LootScript Property LootScript Auto and LootScript.SearchForLoot() and if those were incorrect it wouldn't compile. Which is why I didn't post it before. I can't see how the script side is an issue? The property is assigned to the right quest/alias which is just a reference alias to a forced reference of my follower. Is there some kind of issue with a script property on a script, on a reference alias, pointing to a reference alias? I'm not sure what you mean by record holding the script. Though I think the ultimate solution is just to move the scripts to the quest tab (with proper adjustments of course). Edited March 14, 2022 by jaghar7 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 15, 2022 Share Posted March 15, 2022 Not that it is complicated but that there might be relevant information that isn't necessarily obvious. Thus seeing the source material makes it easier than relying on snippets of information. The script containing the property and call to the function on the second script, what script does it extend? If it is on an alias, it should be extending ReferenceAlias. That is the only thing I can think of that would cause papyrus to state that "Bowen on quest [] is not the right type". As far as not being able to call the function itself, if said alias is empty there will be a null value and the function cannot run. Since you are force filling the alias, it may be possible that this particular aspect is not yet aware that the alias contains an actual reference. Have you verified that the alias is being filled with the correct object? I do not know what your SearchForLoot function does, but if you can shift it to the quest script that might be for the best. Link to comment Share on other sites More sharing options...
jaghar7 Posted March 15, 2022 Author Share Posted March 15, 2022 (edited) Not that it is complicated but that there might be relevant information that isn't necessarily obvious. Thus seeing the source material makes it easier than relying on snippets of information. I get that. I do. It's just, really those two lines are it. There's just not enough there to not be obvious. No information being passed to the function or anything like that. If there's anything in that script that would cause this kind of error then the laws of space time make no sense. And I don't want to tell anyone 'please look through this huge script and tell me why calling this function doesn't work' when I have no doubt the problem is somewhere else. Everything else works. I guess if you REALLY want to see the whole thing I don't mind posting it but I would be utterly stunned and amazed (and quite humbled I'm sure) if you found something related to my current issue. Yes, the scripts extend ReferenceAlias. (Until I move them of course). If the alias was empty the script shouldn't be running at all and neither would several others. At least, that was my understanding and my thinking behind putting them on the alias in the first place. ie I thought for one instance, if I only want Script A to run while my follower is actively following me then I'll put it on the quest alias that contains the follow package. (No alias filled, nothing for the script to run on right? Right?? ) Although, in retrospect that was pretty dumb for this particular quest. Since the alias is always filled and the quest is always running. Meh. I'm new and figuring this out as I go. I'll know better next time (I hope). :smile: Some of my set up is atrocious but somehow it still works. Except when I have issues like this where it used to work and now gives me grief. I suppose it's nice to know that things that stump me can still stump the more experienced. Though I really do appreciate you taking the time. Edited March 15, 2022 by jaghar7 Link to comment Share on other sites More sharing options...
jaghar7 Posted March 15, 2022 Author Share Posted March 15, 2022 (edited) Moving the scripts off the alias to the quest's script tab seems to have done the trick. No more unable to bind errors. Time for the in-game test. Edit: Confirmed. Working again. Edited March 15, 2022 by jaghar7 Link to comment Share on other sites More sharing options...
Recommended Posts