I truly hate Papyrus

Post » Tue May 14, 2013 4:52 am

My script fragment won't compile (again). This is an *EXACT* duplicate of the default game script fragment for one of the default game hireling dialogue. I merely replaced one of the global variables with a newly created custom one (which I have added to the plugin in the CK)

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 2Scriptname zINPCMercenary01 Extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_1Function Fragment_1(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODE0HirelingRecognizeMercenary01.Value=http://forums.bethsoft.com/topic/1459513-i-truly-hate-papyrus/1HasHirelingGV.Value=1(GetOwningQuest() as HirelingQuest).PayHireling(akSpeaker);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentGlobalVariable Property HasHirelingGV Auto  GlobalVariable Property 0HirelingRecognizeMercenary01 Auto

Attempting to manually add the properties for these variables just messes up the script even more (and it still will not compile). Why does the almost EXACT default game script fragment compile just fine, and my script fragment does not compile? Why does the CK hate me, specifically?

Is there an alternative to using the CK to compile papyrus scripts and/or script fragments?

User avatar
Vincent Joe
 
Posts: 3370
Joined: Wed Sep 26, 2007 1:13 pm

Post » Mon May 13, 2013 7:39 pm

It's the '0HirelingRecognizeMercenary01'. http://www.creationkit.com/Identifier_Reference cannot start with digits, thus it's a bad idea to give your forms EditorIDs that start with 'em.

See also: http://www.creationkit.com/Sublime_Text_Setup

User avatar
Claire Mclaughlin
 
Posts: 3361
Joined: Mon Jul 31, 2006 6:55 am

Post » Tue May 14, 2013 3:44 am

Ah....thanks JO, that worked. I always prefix my identifiers with '0' or 'z' so I don't have to fish for them in the CK or TES5Edit. since there was a global for '1stPKillCam', I thought '0' would be ok for a global variable. 'z' it is then!

User avatar
Benjamin Holz
 
Posts: 3408
Joined: Fri Oct 19, 2007 9:34 pm

Post » Tue May 14, 2013 1:18 am

Never starts with digits for naming variables and/or properties :) This rule is applied in every language scripting.

User avatar
Hannah Barnard
 
Posts: 3421
Joined: Fri Feb 09, 2007 9:42 am


Return to V - Skyrim