LegacyCloud Posted February 16, 2016 Share Posted February 16, 2016 I'm hoping someone here knows what will undoubtedly be the simple answer to this seemingly simple requirement; What I want to do is utilize the 'playandwait' function in the begin fragment of a dialogue so that a sound file will play (from the player) before the NPC delivers their audio. From what I can tell, this should sit something like: sound property lcsvendor01 autolcsvendor01.playandwait(game.getplayer()) However when I try to add this to the begin fragment of the dialogue and compile, it hits me with the old 'no viable alternative at input...' bit, but however I try wrapping it in it's own function or event block is just throws up even more errors about expected endfunction's etc... So any words of wisdom would be greatly appreciated before I go bald through pulling my hair out! Link to comment Share on other sites More sharing options...
Terra Nova Posted February 16, 2016 Share Posted February 16, 2016 Need to see the entirety of errors. Link to comment Share on other sites More sharing options...
Ghaunadaur Posted February 16, 2016 Share Posted February 16, 2016 (edited) You need to add a property. Type ; (comment) in the box, nothing else, compile it. Close and re-open your quest. Now you can add the property. Then add your code again. I mean this: lcsvendor01.playandwait(game.getplayer()) Edited February 16, 2016 by Ghaunadaur Link to comment Share on other sites More sharing options...
LegacyCloud Posted February 16, 2016 Author Share Posted February 16, 2016 Full error message as below: Starting 1 compile threads for 1 files... Compiling "TIF__0007F6BC"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0007F6BC.psc(9,0): no viable alternative at input 'sound' C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0007F6BC.psc(9,15): no viable alternative at input 'lcsvendor01' No output generated for TIF__0007F6BC, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on TIF__0007F6BC this is after doing as Ghaunadaur suggested, though I'm not certain I fully understand what the intention was with that instruction. I typed ; (comment) then closed the window, reopened and put in the code but there was no discernible difference in anything :/ Link to comment Share on other sites More sharing options...
Ghaunadaur Posted February 16, 2016 Share Posted February 16, 2016 (edited) Sorry if I wasn't clear, my bad. I meant to type a semicolon, which indicates a comment in papyrus. This is just to compile the script.In a fragment, you need to add a property by using the 'properties' button, not in the code box itself. The code box should only contain the function. lcsvendor01.playandwait(game.getplayer()) Edited February 16, 2016 by Ghaunadaur Link to comment Share on other sites More sharing options...
Terra Nova Posted February 16, 2016 Share Posted February 16, 2016 That's pretty much it. Link to comment Share on other sites More sharing options...
DarthWayne Posted February 16, 2016 Share Posted February 16, 2016 Post the full code please. The payprus fragment textfield shows only a part. To get the full code navigate to Data/Scripts/src and find your script there. Link to comment Share on other sites More sharing options...
LegacyCloud Posted February 16, 2016 Author Share Posted February 16, 2016 Thanks for clarifying. Clearly I'm still misinterpreting something though, since doing as you said - with the property defined - it now tells me that "variable lcsvendor01 is undefined" :( Link to comment Share on other sites More sharing options...
Ghaunadaur Posted February 16, 2016 Share Posted February 16, 2016 Typo? Make sure the property name is matching the name in the code box. Link to comment Share on other sites More sharing options...
LegacyCloud Posted February 16, 2016 Author Share Posted February 16, 2016 (edited) Yeah I think you're right, just banging my head against the wall reverting the script to remove the erronous property in order to verify that was it. Edit: Seems to have been the case, it now compiles without error. However, after compiling I close the window and when I reopen to check again it's as though no code has been added. This reflects in the source as well where the last line it saves is the new property. The begin fragment always loads by default with the following comment in place, not sure if this is the cause or not: ;WARNING: Unable to load fragment source from function Fragment_1 in script TIF__0007F6BC;Source NOT loaded Edited February 16, 2016 by LegacyCloud Link to comment Share on other sites More sharing options...
Recommended Posts