Schavuit
(Fresh Scripter)
2017-03-21 06:55 AM
Script broke after update to 4.67

After I updated to 4.67 from 4.66 to see if that will fix a Windows 10 .dll issue. It broke my script and I keep getting this error

ERROR : expected FUNCTION name!
Script: \\********\C$\Users\*******\Desktop\*******\Scripts\Functions.kix
Error : Incorrect function. (0x1/1)

I'm using "Call" to call the script. any idea on what is wrong??


Mart
(KiX Supporter)
2017-03-21 09:21 AM
Re: Script broke after update to 4.67

It is a bit difficult to see what goes wrong without the code. Can you post the script?

AllenAdministrator
(KiX Supporter)
2017-03-21 02:04 PM
Re: Script broke after update to 4.67

Please see the following threads and see if one of them apply to you.

http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=212333#Post212333
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=212308


Schavuit
(Fresh Scripter)
2017-03-22 04:35 AM
Re: Script broke after update to 4.67

This is inside my main script file


 PHP:
$SCRIPTPATH = "\\mycomputer123\C$\Users\me123\Desktop\myscript\Scripts" ? 'I get here' Call "$SCRIPTPATH\Functions.kix" ? 'I dont get here'

**If I try to call the script without quotes it will get past the call but it will not run the functions.kix script**

this is inside of Functions.kix


 PHP:
? 'I dont get in here'



what I see after starting the script.
************************************

I get here
ERROR : expected FUNCTION name!
Script: \\mycomputer123\C$\Users\me123\Desktop\myscript\Scripts
\Functions.kix


************************************

this script works with version 4.66 I am trying to update it to 4.67, to see if I can get windows 10 to call the correct fileversion from .dll files



AllenAdministrator
(KiX Supporter)
2017-03-22 05:03 AM
Re: Script broke after update to 4.67

I cannot reproduce this. Are you sure you don't have a user defined function called Replace in your functions.kix file? If you properly format the call statement with the variable outside of the quotes does it help?

Call $SCRIPTPATH + "\Functions.kix"


Schavuit
(Fresh Scripter)
2017-03-22 05:25 AM
Re: Script broke after update to 4.67

yes I do have that inside of the functions.kix but I don't get to that yet

 PHP:
? 'i dont get in here' ;************************************************************************ ;***** Function for doing a simple find and replace ***** ;************************************************************************ Function Replace($FullString,$OriginalString,$ReplaceString) $Replace = Join (Split($FullString,$OriginalString),$ReplaceString) EndFunction


and I just tried -- Call $SCRIPTPATH + "\Functions.kix" -- Same thing as before.


AllenAdministrator
(KiX Supporter)
2017-03-22 05:31 AM
Re: Script broke after update to 4.67

Okay so first things first... remove the Replace UDF. It's built in kix 4.61 and above. Why 4.61 - 4.66 ignored it, I have no idea. But 4.67 does not like it.

Here is my test script

 Code:
break on
$RC=setoption("WOW64AlternateRegView","On")
$RC=setoption("Wow64FileRedirection","on")
$RC=setoption("WrapATEOL","on")
$RC=setoption("NoVarsinStrings","on")
$RC=setoption("NoMacrosinstrings","on")

? @kix
? @producttype + " " + iif(@onwow64,"64bit","32bit")
$SCRIPTPATH = "\\mycomputer\C$\Users\me\Desktop\myscript\Scripts"


if exist($scriptpath)
  ? "Calling Functions.kix"
  Call $scriptpath + "\Functions.kix"
  if @error=0
    ? "Functions.kix Loaded"
  else
    ? @serror
  endif
else
  ? "Scriptpath does not exist or is not formatted properly"  
endif


Inside Functions.kix I have this and nothing else.
 Code:
? "Inside Functions.kix"


Please post your results


Schavuit
(Fresh Scripter)
2017-03-22 05:48 AM
Re: Script broke after update to 4.67

Sweet so we got a fix action...

Remove the user defined function called Replace... It will break it.. Thanks for all of the help!!

Now to see if win10 works.. if not ill be back!


Mart
(KiX Supporter)
2017-03-22 09:14 AM
Re: Script broke after update to 4.67

 Originally Posted By: Allen
Okay so first things first... remove the Replace UDF. It's built in kix 4.61 and above. Why 4.61 - 4.66 ignored it, I have no idea. But 4.67 does not like it.

....



I hope Ruud checks in soon so he might be able to share some info on this issue.
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=212313#Post212313