tox2ik Posted May 17, 2012 Share Posted May 17, 2012 Put some spaces in there. The compiler is thinking that's a "-1" (negative) instead of "- 1" (minus). HA HAHAHA :D well observed, thank you! Link to comment Share on other sites More sharing options...
Perraine Posted May 17, 2012 Share Posted May 17, 2012 Hm. Here goes: What would cause the game to ignore your _0 NIF and not blend the _0 and _1 NIFs for a piece of custom clothing/armor when adjusting a character/NPC's weight? Most likely cause is that the mod author simply duplicated _0 mesh and called it _1, this occurs sometimes when making changes to vanilla armors, as you can spend hours getting everything lined up in Nifskope for the _0 mesh, but as soon as you try to make the same adjustments to the _1 mesh nothing lines up and you have clipping all over the place, so it's sometimes easier just to make both versions the same and tell people the weight slider don't work Also the 2 meshes may be different in their internal structure somehow, though why your game isn't simply crashing is amazing ... The _0 and _1 meshes must be identical in every way except for the overall vertex positions/scale, so all "bodies" must be the same, all armor bits, NiTriShapes, BSDismemberSkinInstance, everything must be the same between the 2 otherwise the game can't 'morph' between them. Link to comment Share on other sites More sharing options...
tox2ik Posted May 18, 2012 Share Posted May 18, 2012 I've stumbled on another weird case: Scriptname WTF2 extends Quest {auto-converts strings to upprcare} String[] property catNames Auto String[] lessWtf Event OnInit() debug.trace("\nWTF2 ONINIT") catNames = new String[8] lessWtf = new String[3] catNames[0] = "Weapons" catNames[1] = "Apparel" catNames[2] = "Potions" catNames[3] = "Scrolls" catNames[4] = "Food" catNames[5] = "Ingredients" catNames[6] = "Books" catNames[7] = "Misc" lessWtf[0] = "Juice " lessWtf[1] = "fork " lessWtf[2] = "CROCOdileTEETH are Not toys" debug.trace(catNames) debug.trace(lessWtf) endEvent The above prints: WTF2 ONINIT [05/18/2012 - 01:13:02PM] ["WEAPONS", "APPAREL", "POTIONS", "SCROLLS", "FOOD", "INGREDIENTS", "BOOKS", "MISC"] [05/18/2012 - 01:13:02PM] ["Juice ", "fork ", "CROCOdileTEETH are Not toys"] Link to comment Share on other sites More sharing options...
russianfederalist Posted May 18, 2012 Share Posted May 18, 2012 Been staring at this one for about an hour, others would be pulling out their hair by now. ScriptName WTF extends Form int Function Megafail() int x = 0 int y = 0 x = 22 y = x-1 Return y endFunction Starting 1 compile threads for 1 files...Compiling "WTF"...c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\WTF.psc(6,5): no viable alternative at input 'x'No output generated for WTF, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on WTF I was doing the same mistake. Spaces are VERY important!!!!!!! Link to comment Share on other sites More sharing options...
fg109 Posted May 18, 2012 Share Posted May 18, 2012 (edited) I've stumbled on another weird case: Scriptname WTF2 extends Quest {auto-converts strings to upprcare} String[] property catNames Auto String[] lessWtf Event OnInit() debug.trace("\nWTF2 ONINIT") catNames = new String[8] lessWtf = new String[3] catNames[0] = "Weapons" catNames[1] = "Apparel" catNames[2] = "Potions" catNames[3] = "Scrolls" catNames[4] = "Food" catNames[5] = "Ingredients" catNames[6] = "Books" catNames[7] = "Misc" lessWtf[0] = "Juice " lessWtf[1] = "fork " lessWtf[2] = "CROCOdileTEETH are Not toys" debug.trace(catNames) debug.trace(lessWtf) endEvent The above prints: WTF2 ONINIT [05/18/2012 - 01:13:02PM] ["WEAPONS", "APPAREL", "POTIONS", "SCROLLS", "FOOD", "INGREDIENTS", "BOOKS", "MISC"] [05/18/2012 - 01:13:02PM] ["Juice ", "fork ", "CROCOdileTEETH are Not toys"] It's impossible to really control capitalization in strings, though it might be possible with SKSE's ToLower and ToUpper functions. The game automatically converts most of the words used as names for object types to all upper case, and many other words used by the programmers to all lower case. Edited May 18, 2012 by fg109 Link to comment Share on other sites More sharing options...
tox2ik Posted May 18, 2012 Share Posted May 18, 2012 (edited) I was doing the same mistake. Spaces are VERY important!!!!!!! I'd say it's more important to define operators like standard languages do it, and not as some silly math domain specific language. NO ONE WILL EVER FIGURE OUT NEGATION: x * -1 IMPLEMENT MATH OPERATORS NAO!!!! Edited May 18, 2012 by tox2ik Link to comment Share on other sites More sharing options...
tox2ik Posted May 18, 2012 Share Posted May 18, 2012 It's impossible to really control capitalization in strings, though it might be possible with SKSE's ToLower and ToUpper functions. The game automatically converts most of the words used as names for object types to all upper case, and many other words used by the programmers to all lower case. I'm sure SKSE will solve a lot of issues or at least make a lot of stuff simpler. But until they release a papyrus-enabled version and some proper examples, we're stuck using bare bones papyrus. Besides, I don't have a particular incentive or urge to rely on a main-app-version-specific dll injector for basic array store-retrieve operation. So let's wait and see what the next SKSE release has in store for us, and in the mean time.. catNames[0] = "Weapons " catNames[1] = "Apparel " catNames[2] = "Potions " catNames[3] = "Scrolls " catNames[4] = "Food & Drink" catNames[5] = "Ingredients " catNames[6] = "Books " catNames[7] = "Misc. Stuff" Padding with a single space at the end of the string, or in the middle seems to solve the problem for me. Not sure how reliable this is. How can they fail at coding such a basic operation? [05/18/2012 - 04:26:55PM] WTF2: ; <--- this is still unpadded from the previous example [05/18/2012 - 04:26:55PM] ["WEAPONS", "APPAREL", "POTIONS", "SCROLLS", "FOOD", "INGREDIENTS", "BOOKS", "MISC"] [05/18/2012 - 04:26:56PM] returning equipped [05/18/2012 - 04:26:56PM] weight PRE: 98 [05/18/2012 - 04:26:56PM] Weapons : 33.000000 [05/18/2012 - 04:26:56PM] Apparel : 58.000000 [05/18/2012 - 04:26:56PM] Potions : 5.000000 [05/18/2012 - 04:26:56PM] Scrolls : 0.000000 [05/18/2012 - 04:26:56PM] Food & Drink: 0.000000 [05/18/2012 - 04:26:56PM] Ingredients : 0.000000 [05/18/2012 - 04:26:57PM] Books : 1.000000 [05/18/2012 - 04:26:57PM] Misc. Stuff: 1.000000 [05/18/2012 - 04:26:57PM] Total: 98 [05/18/2012 - 04:26:57PM] re-equipping item 1/5: [WEAPON < (00013790)>] [05/18/2012 - 04:26:57PM] re-equipping item 2/5: [Armor < (00012E4D)>] [05/18/2012 - 04:26:57PM] re-equipping item 3/5: [Armor < (00012E46)>] [05/18/2012 - 04:26:57PM] re-equipping item 4/5: [Armor < (00012E49)>] [05/18/2012 - 04:26:57PM] re-equipping item 5/5: [Armor < (00012E4B)>] keywords: uppercase lowercase papyrus array string convert BTW: Does any one else think that they are using Java in the core? Because from the client perspective, their VM, syntax, file names / classes all seem very similar to how google implemented a java-vm in Android. Link to comment Share on other sites More sharing options...
Recommended Posts