ID:259227
 
If I uncomment the commented lines below, all hell breaks loose! The verb loops through the list of text strings over and over and over again. What have I done?!

Thanks...

verb/GM_build_textfile()
var/list/dmfiles = list("areas.dm", "intercom.dm", "lights.dm", \
"mapSmasher.dm", "mobs.dm", "newVacuum.dm", "stMotionTracker.dm", \
"tugMain.dm", "weapons.dm")

spawn
// shell("del stug.txt")
sleep(5)

var/myFile

for(myFile in dmfiles)
var/myCommand = "type [myFile] >> stug.txt"
usr << myCommand
// shell(myCommand)
sleep(5)

usr << "And that's that."

There may be a problem with shell() in Windows. I'll look into it. For your purposes, however, I think fdel() and fcopy() might do the trick.

--Dan
On 9/17/00 8:53 pm Guy T. wrote:
If I uncomment the commented lines below, all hell breaks loose! The verb loops through the list of text strings over and over and over again. What have I done?!

This is weird. I tested your example almost verbatim and it didn't do anything funky, but it didn't work (creating stub.txt) either. The reason it failed is that the windows shell() isn't properly handling redirect commands. I'll work on that. But I can't explain the strange result you got. Perhaps it had to do with the failure of the command. Hopefully it will go away once the shell() succeeds.