@@ -29,7 +29,7 @@ public static int LoadScript(IntPtr scriptPath, IntPtr className, IntPtr ownerOb
2929
3030 if ( string . IsNullOrEmpty ( path ) || string . IsNullOrEmpty ( classNameStr ) )
3131 {
32- SetWarning ( "Invalid script path or class name" ) ;
32+ PrintWarning ( "Invalid script path or class name" ) ;
3333 return - 1 ;
3434 }
3535
@@ -38,7 +38,7 @@ public static int LoadScript(IntPtr scriptPath, IntPtr className, IntPtr ownerOb
3838 if ( ! result . Success )
3939 {
4040 string errors = string . Join ( "\n " , result . Errors ) ;
41- SetWarning ( $ "Script compilation failed:\n { errors } ") ;
41+ PrintWarning ( $ "Script compilation failed:\n { errors } ") ;
4242 return - 1 ;
4343 }
4444
@@ -50,14 +50,14 @@ public static int LoadScript(IntPtr scriptPath, IntPtr className, IntPtr ownerOb
5050 }
5151 catch ( Exception ex )
5252 {
53- SetWarning ( $ "Failed to create instance: { ex . Message } ") ;
53+ PrintWarning ( $ "Failed to create instance: { ex . Message } ") ;
5454 result . Unload ( ) ;
5555 return - 1 ;
5656 }
5757
5858 if ( instance == null )
5959 {
60- SetWarning ( "Failed to create script instance" ) ;
60+ PrintWarning ( "Failed to create script instance" ) ;
6161 result . Unload ( ) ;
6262 return - 1 ;
6363 }
@@ -82,7 +82,7 @@ public static int LoadScript(IntPtr scriptPath, IntPtr className, IntPtr ownerOb
8282 }
8383 catch ( Exception ex )
8484 {
85- SetWarning ( $ "Exception in LoadScript: { ex . Message } ") ;
85+ PrintWarning ( $ "Exception in LoadScript: { ex . Message } ") ;
8686 return - 1 ;
8787 }
8888 }
@@ -105,7 +105,7 @@ public static byte UpdateScript(int scriptId)
105105 }
106106 catch ( Exception ex )
107107 {
108- SetWarning ( $ "Exception in UpdateScript: { ex . Message } ") ;
108+ PrintWarning ( $ "Exception in UpdateScript: { ex . Message } ") ;
109109 return 0 ;
110110 }
111111 }
0 commit comments