gregathit Posted August 15, 2013 Posted August 15, 2013 I am trying to correct a few of the errors in the White Cat Courier plugin that Sir Slammer64 has been kind enough to translate. One error however is kicking my ass: scn kzsFuncJobClearInfoData short idx ;0-9 ref refJobData ref refCustomer ref refTokenCustomer ref refPackage ref refTag ref refPC ref refZara ref refNull short iStatus short iJobType short iPackageType ref refStaff ref refContZara short iWork begin Function { idx } set iWork to ar_Size kzsQuestLoversWhiteCatCourier.arJobInfoData if (idx < 0) || (idx >= iWork) PrintC "LoversWhiteCatCourier::Job:ClearInfo:Bad Job Index(%g)" idx return endif set refNull to 0 set refPC to Player set refZara to kzsNpcBDTS00Ref set refContZara to kzsContBDTSStolenItemRef Let refJobData := kzsQuestLoversWhiteCatCourier.arJobInfoData[idx] Let refTokenCustomer := kzsQuestLoversWhiteCatCourier.arJobTokenCustomer[idx] Let refPackage := kzsQuestLoversWhiteCatCourier.arJobPackage[idx] Let refTag := kzsQuestLoversWhiteCatCourier.arJobTag[idx] set refCustomer to refJobData.GetRefVariable "refCustomer" set refStaff to refJobData.GetRefVariable "refStaff" if (refCustomer) && (refTokenCustomer) Call xLoversCmnSetItemCount refCustomer refTokenCustomer 0 endif ;”z’B—pRandom Item‚ðíœ set iStatus to refJobData.GetVariable "iStatus" set iJobType to refJobData.GetVariable "iJobType" set iPackageType to refJobData.GetVariable "iPackageType" if (iStatus >= 2) ;ŽÀs’†Job if (iJobtype == 1) && (iPackageType == 1) ;”z’B—pRandom Item‚ðPlayer‚©‚çíœ Call kzsFuncJobItemAddDel refPC refJobData 1 ;Zara‚É“‚Ü‚ê‚Ä‚¢‚½‚©‚à‚µ‚ê‚È‚¢‚̂œ•i” ‚©‚ç‚àíœ Call kzsFuncJobItemAddDel refContZara refJobData 1 endif endif refJobData.RemoveAllItems ;StaffŒÂ•ÊJob‚¾‚Á‚½ê‡AFlg‚ðƒNƒŠƒA if (refStaff == kzsNpcWCC02Ref) if (idx == kzsQuestLoversWhiteCatCourierJobSelecter.iStaffJobAviable02) set kzsQuestLoversWhiteCatCourierJobSelecter.iStaffJobAviable02 to -1 endif elseif (refStaff == kzsNpcWCC03Ref) if (idx == kzsQuestLoversWhiteCatCourierJobSelecter.iStaffJobAviable03) set kzsQuestLoversWhiteCatCourierJobSelecter.iStaffJobAviable03 to -1 endif elseif (refStaff == kzsNpcWCC04Ref) if (idx == kzsQuestLoversWhiteCatCourierJobSelecter.iStaffJobAviable04) set kzsQuestLoversWhiteCatCourierJobSelecter.iStaffJobAviable04 to -1 endif elseif (refStaff == kzsNpcWCC05Ref) if (idx == kzsQuestLoversWhiteCatCourierJobSelecter.iStaffJobAviable05) set kzsQuestLoversWhiteCatCourierJobSelecter.iStaffJobAviable05 to -1 endif elseif (idx == kzsQuestLoversWhiteCatCourierJobSelecter.iMerchJobAviable) set kzsQuestLoversWhiteCatCourierJobSelecter.iMerchJobAviable to -1 endif ;Package/Tag‚Ìœ‹Ž set iWork to refPC.GetItemCount refPackage if (iWork) refPC.RemoveItem refPackage iWork else ;Zara‚É“‚܂ꂽH set iWork to refContZara.GetItemCount refPackage if (iWork) refContZara.RemoveItemNS refPackage iWork endif endif set iWork to refPC.GetItemCount refTag if (iWork) refPC.RemoveItem refTag iWork endif Call kzsFuncJobSetParamOne refNull idx 0 0 0 0 0 refNull 0 SetWeight 0.0 refPackage ;Zara“•i” Accesser‚ÌŒãŽn–– if (0 >= refContZara.GetNumItems) ;“•i” ‚ª‹ó‚Ȃ̂ÅAccesser‚𜋎 Call xLoversCmnSetItemCount refPC kzsMiscBDTSStolenItemAccesser 0 Call xLoversCmnSetItemCount refZara kzsMiscBDTSStolenItemAccesser 0 endif if (kzsQuestLoversWhiteCatCourier.iDebugOn) PrintC "LoversWhiteCatCourier::Job:ClearInfo:Cleared Job No(%g)" idx endif end The error I am getting is "invalid expression for parameter 9. Expected object. I have marked the line in red that is giving the error.
perfectioncat Posted August 16, 2013 Posted August 16, 2013 Hello, greg. It becomes the error by the original equally. A solution is to make the last parameter ref variable.
gregathit Posted August 16, 2013 Author Posted August 16, 2013 Hello Perfectioncat. Can you give me an example?
perfectioncat Posted August 16, 2013 Posted August 16, 2013 OK. ref dungionRef .... .... .... .... set dungionRef to 0 Call kzsFuncJobSetParamOne refNull idx 0 0 0 0 0 refNull dungionRef I think this is a failure of the CS rather than syntactical problems. Or it may be failure of CS extender.
gregathit Posted August 16, 2013 Author Posted August 16, 2013 How about: Call kzsFuncJobSetParamOne refNull idx 0 0 0 0 0 refNull refPackage The CS extender likes this one.
perfectioncat Posted August 16, 2013 Posted August 16, 2013 It uses a variable for a parameter at other points using kzsFuncJobSetParamOne function. In that case, it can compile the error without occurring. If this case uses a variable equally, the error cannot occur. And it was revealed that an error did not occur by appointing at least last parameter with a variable.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now