init.js:24: SyntaxError: Unexpected token '.'
SyntaxError: Unexpected token '.'
Puerts.JsEnv.Eval (System.String chunk, System.String chunkName) (at Assets/TS/Puerts/Src/JsEnv.cs:210)
Puerts.JsEnv.ExecuteFile (System.String filename) (at Assets/TS/Puerts/Src/JsEnv.cs:193)
Puerts.JsEnv..ctor
PuertsDLL.cs
old
#if PUERTS_GENERAL && !PUERTS_GENERAL_OSX
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Eval(IntPtr isolate, byte[] code, string path);
public static IntPtr EvalChecked(IntPtr isolate, string code, string path)
{
if (code == null)
{
throw new InvalidProgramException("eval null string");
}
return Eval(isolate, Encoding.UTF8.GetBytes(code), path);
}
#else
new
#if PUERTS_GENERAL && !PUERTS_GENERAL_OSX
[DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Eval(IntPtr isolate, byte[] code, string path);
public static IntPtr EvalChecked(IntPtr isolate, string code, string path)
{
if (code == null)
{
throw new InvalidProgramException("eval null string");
}
System.Collections.Generic.List<byte> bufferTemp = new System.Collections.Generic.List<byte>( Encoding.UTF8.GetBytes(code) );
bufferTemp.Add(0);//last byte of const char*
return Eval(isolate, bufferTemp , path);
}
#else
init.js:24: SyntaxError: Unexpected token '.'
SyntaxError: Unexpected token '.'
Puerts.JsEnv.Eval (System.String chunk, System.String chunkName) (at Assets/TS/Puerts/Src/JsEnv.cs:210)
Puerts.JsEnv.ExecuteFile (System.String filename) (at Assets/TS/Puerts/Src/JsEnv.cs:193)
Puerts.JsEnv..ctor
PuertsDLL.cs
old
new