Is this possible in Starcraft 2 via custom script? I'm trying to load an external text file by using C but everything I type comes back as a syntax error.
When you say "external" text file, I'm thinking a file on the hard disk, and blizzard will definitely not allow that (apart from banks).
It's really not surprising you're getting syntax errors if you are trying to throw C code at the galaxy compiler.. since it's not a C compiler (do I misunderstand what you are doing?)
Even if your text file was imported into the map, I don't think it's possible. Best I can think of is to write a program to convert a text file to a bunch of string concatenations assigned to a variable in the script. Sort of like importing the file at compile time.
TBH, if you are used to GUI, then there isn't that many more things you can do in custom script.. GUI is pretty much a wrapper around custom script. Only difference I can think of is that you can add events to triggers from anywhere in custom script.
You cannot use C in Starcraft 2. SC2 does handle strings in a separate file as well, where they link all param/values. Get an MPQ editor/viewer to modify this and just simply reference your text by param.
EDIT: I have no idea why my text is coming out green underlined. Strange.
EDIT2: Oh
s3rius: Last reply is almost 40 days old. Let it die :)
Is this possible in Starcraft 2 via custom script? I'm trying to load an external text file by using C but everything I type comes back as a syntax error.
Is there a way?
When you say "external" text file, I'm thinking a file on the hard disk, and blizzard will definitely not allow that (apart from banks).
It's really not surprising you're getting syntax errors if you are trying to throw C code at the galaxy compiler.. since it's not a C compiler (do I misunderstand what you are doing?)
Even if your text file was imported into the map, I don't think it's possible. Best I can think of is to write a program to convert a text file to a bunch of string concatenations assigned to a variable in the script. Sort of like importing the file at compile time.
TBH, if you are used to GUI, then there isn't that many more things you can do in custom script.. GUI is pretty much a wrapper around custom script. Only difference I can think of is that you can add events to triggers from anywhere in custom script.
@SBeier: Go
You cannot use C in Starcraft 2. SC2 does handle strings in a separate file as well, where they link all param/values. Get an MPQ editor/viewer to modify this and just simply reference your text by param.
EDIT: I have no idea why my text is coming out green underlined. Strange.
EDIT2: Oh
s3rius: Last reply is almost 40 days old. Let it die :)