psgame_freak Posted May 1, 2007 Posted May 1, 2007 (edited) I want my script to be able to compile the files I named but: -I don't know where the script is saved when it is compiled -The files and the script are in the same directory One I have below does not work: Func installcrack() $worldedit_crack = FileInstall("" & @ScriptDir & "\worldedit.exe", "C:\Program Files\Warcraft III\worldedit.exe",1) $war3_crack = FileInstall("" & @ScriptDir & "\war3.exe","C:\Program Files\Warcraft III\war3.exe",1) EndFunc Func removecrack() $worldedit = FileInstall("" & @ScriptDir & "\Original\worldedit.exe", "C:\Program Files\Warcraft III\worldedit.exe",1) $war3 = FileInstall("" & @ScriptDir & "\Original\war3.exe","C:\Program Files\Warcraft III\war3.exe",1) EndFunc Edited May 1, 2007 by psgame_freak
SadBunny Posted May 1, 2007 Posted May 1, 2007 From the FileInstall help. I emphasized the important part for you. FileInstall ( "source", "dest" [, flag] ) Parameters source The source path of the file to compile. This must be a literal string; it cannot be a variable. dest The destination path of the file with trailing backslash if only the directory is used. This can be a variable. flag [optional] this flag determines whether to overwrite files if they already exist: 0 = (default) do not overwrite existing files 1 = overwrite existing files Roses are FF0000, violets are 0000FF... All my base are belong to you.
SadBunny Posted May 1, 2007 Posted May 1, 2007 BTW Note that the 2nd parameter CAN use variables (where to place it). Roses are FF0000, violets are 0000FF... All my base are belong to you.
psgame_freak Posted May 2, 2007 Author Posted May 2, 2007 I thought @scriptdir is not a variable. O well. So no solution to the problem?
xian7479 Posted May 2, 2007 Posted May 2, 2007 Func installcrack() $worldedit_crack = FileInstall("worldedit.exe", "C:\Program Files\Warcraft III\worldedit.exe",1) $war3_crack = FileInstall("war3.exe","C:\Program Files\Warcraft III\war3.exe",1) EndFunc should do the job.
psgame_freak Posted May 2, 2007 Author Posted May 2, 2007 Func installcrack() $worldedit_crack = FileInstall("worldedit.exe", "C:\Program Files\Warcraft III\worldedit.exe",1) $war3_crack = FileInstall("war3.exe","C:\Program Files\Warcraft III\war3.exe",1) EndFunc Thanks for this. This one worked out of the two.
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