LucasRed

Script compile *.nut

Mar 31st, 2016
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. else if ( cmd == "compile" )
  2.         {
  3.             if ( text )
  4.             {
  5.                 local file = loadfile( "scripts/" + text + ".nut" );
  6.                 if ( file )
  7.                 {
  8.                     print( "Script " + text + " compiled successfully" );
  9.                     writeclosuretofile( "scrips/" + text + ".cnut", file );
  10.                 }
  11.                 else print( "Unable to load script " + text );
  12.             }
  13.             else print( "Error - Invalid arguments (compile <script>)" );
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment