csbx Posted March 17 Share Posted March 17 Yep - I've copied the script psc files to the correct path, but skse functions do not compile. Right now I'm trying to use setname: (mytextholder is defined as a static property) myTextHolder.setName( "Whatever text you like!") But it's throwing errors at this line -- no viable alternative at input '.' Other SKSE functions don't run as well. How do I troubleshoot this ? I'm using CK platform extended from within MO2. Link to comment Share on other sites More sharing options...
xkkmEl Posted March 17 Share Posted March 17 That error message is not usually indicative of SKSE problems. I believe your problem is with code around the line where you are seeing this error. Link to comment Share on other sites More sharing options...
scorrp10 Posted March 17 Share Posted March 17 I know that SKSE distributables place source code in Data/Scripts/Source. But CK for SE looks for source code in Data/Source/Scripts. It is really all over the place. Some mods do it one way some the other. Some hide source in a .bsa. As source code is not needed at play time, this only matters if one makes use of those scripts while editing. So what I do is unzip the Source.zip, and then make sure to copy over source from SKSE and other mods (SkyUI, UIExtensions etc) to Source/Scripts. With MO2 is an extra layer of complexity because of its file management. I prefer Vortex. Link to comment Share on other sites More sharing options...
csbx Posted March 17 Author Share Posted March 17 @ scorrp10 - Thanks--have definitely put the psc files there. And when adding a script in the CK I can see that the armor.psc found is in fact embedded with SKSE code. So the scripts seem to be there. @ xkkmEI - Yeah, I don't get what's happening here. I embedded this in a working script--so nothing around it has a problem. Am I using this improperly ? Static Property myTextHolder Auto myTextHolder.setName("here is text") Link to comment Share on other sites More sharing options...
AaronOfMpls Posted March 17 Share Posted March 17 (edited) 2 hours ago, scorrp10 said: With MO2 is an extra layer of complexity because of its file management. Yah, you can put them in Data directly. Or in a MO mod folder -- call it something like "SKSE script source", then enable that in your left pane. EDIT: Technically, you don't even need to make a second copy of the source files. Instead you can symlink or hardlink everything from one location to the other. This is fairly common in Linux, but less so in Windows filesystems -- though it is possible on Windows. Edited March 17 by AaronOfMpls Link to comment Share on other sites More sharing options...
csbx Posted March 17 Author Share Posted March 17 What's a basic SKSE function I can use to verify it's set up ? Everything I try to call just fails. Normally with Papyrus I can quickly sort out the syntax and get it working.. Link to comment Share on other sites More sharing options...
xkkmEl Posted March 17 Share Posted March 17 7 hours ago, csbx said: myTextHolder.setName("here is text") These statements need to be inside a function or event declaration, unlike property (or function, or event) declarations which need to be at the top level of the script file. Please see my amended example in the original thread. Link to comment Share on other sites More sharing options...
csbx Posted March 20 Author Share Posted March 20 On 3/17/2024 at 4:05 PM, xkkmEl said: These statements need to be inside a function or event declaration, unlike property (or function, or event) declarations which need to be at the top level of the script file. Please see my amended example in the original thread. Thanks a lot - I'm increasingly discovering how certain functions--skse and otherwise--require certain contexts to function. It's just bafflingly arbitrary to my mind at this stage. I actually think something similar his occurring at my latest roadblock related to getref(). I'm building a script attached to a quest that takes the following form: alias property mapmarkerAlias auto ;from BQ01 Event Oninit() ObjectReference BQ01MapMarker = mapmarkerAlias.getreference() If BQ01MapMarker == MapMarkerInFormlist blahblah Endif EndEvent I'm using getreference() (to my eye) in exactly the way the CK site does in its example. But there's something structurally wrong with this. Basic stuff, but I'm totally baffled. Any ideas ? Link to comment Share on other sites More sharing options...
xkkmEl Posted March 20 Share Posted March 20 You want mapmarkerAlias to be a ReferenceAlias, not an Alias (in your 1st line). I am not seeing how MapMarkerInFormlist is declared. Link to comment Share on other sites More sharing options...
csbx Posted March 21 Author Share Posted March 21 On 3/19/2024 at 9:48 PM, xkkmEl said: You want mapmarkerAlias to be a ReferenceAlias, not an Alias (in your 1st line). I am not seeing how MapMarkerInFormlist is declared. Thanks for taking the time - you solved my issue ! My next question (the script is almost done, just buttoning it up) is about the following (I've just copied the relevant portions). My failsafe is setting foundlocationtype = 99 for if I can't find a match. MapMarkerInFormlist refers to a bunch of REFR map markers in a formlist that I made. BQ01MapMarker is supposed to be a REFR map marker as pulled from the alias of the BQ01 quest. I've run this and the 'if' is never satisfied even when it should be--ie. should find the match in my formlist of markers. Can you see a problem ? It's probably regarding objectreference but I'm obviously not understanding. I suppose if I were to troubleshoot I'd debugmessage mapmarkerinformlist as a string and do the same to bq01mapmarker. They should obviously match when the quest alias marker matches one from my formlist. Scriptname csbmagLocationsQuestScript extends Quest Formlist Property csbmagmarkersNordR auto Int FoundLocationType Int FoundLocationIndex Int Index String Property CorrectReplacementText auto FoundLocationType = 99 Index = csbmagmarkersNordR.GetSize() While Index > 0 Index -= 1 ObjectReference MapMarkerInFormlist = csbmagmarkersNordR.GetAt(Index) As ObjectReference ObjectReference BQ01MapMarker = mapmarkerAlias.getreference() As ObjectReference If BQ01MapMarker == MapMarkerInFormlist FoundLocationIndex = Index FoundLocationType = 2 ;exit this whole while loop and other whiles debug.messagebox("I've matched to a nordic ruin") Endif EndWhile Link to comment Share on other sites More sharing options...
Recommended Posts