Flodder450 Posted March 5, 2013 Share Posted March 5, 2013 Hi,im trying to create an entry into c:/temp/log.txt, regardless of computer (it needs to work on every computer you use it on)When im trying to execute it, i get an parameter missing error, but i cant for the life of me find where i should put one/how i should put it in, can anyone help? heres the script: Function schrijflog("filenaam") IF EXIST(c:/temp/) ELSE MD(c:/temp/) ENDIF IF EXIST(c:/temp/log.txt) ELSE MD(c:/temp/log.txt) ENDIF OPEN c:/temp/log.txt WRITELINE "Hall0n!" CLOSE c:/temp/log.txt endfunction schrijflog("log.txt") 99 Firemaking 30-5-2010 | 99 Fletching 13-7-2014 TET-AU member:6-10-2010 - 21-10-2011 Link to comment Share on other sites More sharing options...
Hedgehog Posted March 5, 2013 Share Posted March 5, 2013 Maybe try something like this Function schrijflog(filenaam) IF NOT EXIST("c:/temp/" + $filenaam) MD("c:/temp/" + $filenaam) ENDIF OPEN "c:/temp/" + $filenaam WRITELINE "Hall0n!" CLOSE "c:/temp/" + $filenaam endfunction schrijflog("log.txt") I'm not familiar with the language, so there might be some syntax errors, but I think that I solved your problem. Link to comment Share on other sites More sharing options...
Flodder450 Posted March 9, 2013 Author Share Posted March 9, 2013 Managed to fix it, just need to get it to write a parameter :) Function log IF EXIST("c:/temp/") ELSE MD("c:/temp/") ENDIF IF OPEN (1,"c:/temp/log.txt",1) SLEEP 2 ELSE OPEN (1,"c:/temp/log.txt",4) ENDIF If OPEN (,"c:/temp/log.txt", ) endfunction ? call log 99 Firemaking 30-5-2010 | 99 Fletching 13-7-2014 TET-AU member:6-10-2010 - 21-10-2011 Link to comment Share on other sites More sharing options...
Flodder450 Posted March 14, 2013 Author Share Posted March 14, 2013 SOLVED! Function log ($tekst) IF EXIST("c:/temp/") ELSE MD("c:/temp/") ENDIF OPEN (2,"c:/temp/log.txt",5) Writeline (2,$tekst) CLOSE (2) endfunction log("Dit log is gemaakt met Kixscript :)!!!!!!!!!") 99 Firemaking 30-5-2010 | 99 Fletching 13-7-2014 TET-AU member:6-10-2010 - 21-10-2011 Link to comment Share on other sites More sharing options...
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