irswat Posted January 12, 2017 Share Posted January 12, 2017 The code seems right, but I'm getting compiler errors. C:\Games\steamapps\common\skyrim\Data\Scripts\Source\SVE_ParserEngine.psc(2308,26): no viable alternative at input '[]'C:\Games\steamapps\common\skyrim\Data\Scripts\Source\SVE_ParserEngine.psc(2308,27): mismatched tree node: LoopCounter expecting <UP>C:\Games\steamapps\common\skyrim\Data\Scripts\Source\SVE_ParserEngine.psc(2312,3): variable counter2 is undefinedC:\Games\steamapps\common\skyrim\Data\Scripts\Source\SVE_ParserEngine.psc(2312,3): type mismatch while assigning to a none (cast missing or types unrelated)C:\Games\steamapps\common\skyrim\Data\Scripts\Source\SVE_ParserEngine.psc(2313,3): variable counter1 is undefinedC:\Games\steamapps\common\skyrim\Data\Scripts\Source\SVE_ParserEngine.psc(2313,3): variable counter1 is undefinedC:\Games\steamapps\common\skyrim\Data\Scripts\Source\SVE_ParserEngine.psc(2313,11): cannot add a none to a int (cast missing or types unrelated)C:\Games\steamapps\common\skyrim\Data\Scripts\Source\SVE_ParserEngine.psc(2315,10): mismatched tree node: = expecting <UP> I've never seen some of these before. int counter1=0 int counter2=0 int d1=LengthOfItemName int d2=LengthOfCMDItem int[] TalleyofMatchingWords=new int[128] ;how many words of the current form (curFormList[LoopCounter]) match command content (Formulator) while counter1<=d1 while counter2<=d2 if curFormString[counter1]==Formulator[counter2] TalleyofMatchingWords[LoopCounter]+=1 ;this line is 2308 endif counter2+=1 endWhile counter2=0 counter1+=1 endWhile counter1=0 Link to comment Share on other sites More sharing options...
mrpwn Posted January 12, 2017 Share Posted January 12, 2017 (edited) The += operator is most likely the issue. You can only use the simple assignment operator, =, when assigning directly to an array element. So you should use this line instead: TalleyofMatchingWords[LoopCounter] = TalleyofMatchingWords[LoopCounter] + 1 By the way, the linter that I've included in SublimePapyrus can catch illegal code like that. Edited January 12, 2017 by mrpwn Link to comment Share on other sites More sharing options...
irswat Posted January 12, 2017 Author Share Posted January 12, 2017 (edited) thanks mate. Is it possible to use this package with notepad++ also, or only sublime text? Edited January 12, 2017 by irswat Link to comment Share on other sites More sharing options...
mrpwn Posted January 12, 2017 Share Posted January 12, 2017 It is only available for Sublime Text at the moment. The linter is integrated instead of being a standalone Python script in order to eliminate the overhead introduced by starting an external program (around 1-2 seconds in my experience). That said the linter could be separated into its own little program that could then be used with other editors just to do the linting (it also handles some of the completion system's logic in its current integrated form). Link to comment Share on other sites More sharing options...
Recommended Posts