March 5, 201313 yr 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
March 5, 201313 yr 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.
March 9, 201313 yr Author 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
March 14, 201313 yr Author 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
Create an account or sign in to comment