Game Development Community

Topic: Help plz , scripting file (help RLY NEEDED) , takes 1 min

by Shadi · in General Discussion · 07/11/2007 (10:19 pm) · 14 replies

Am sorry if this is the wrong place to post this but PLZ help i rly need it and i rly rly mean it , i just need to know how i make my comp read the files.cs as scripting files .. (when i make text file and change it to name.cs they dont ask me if if am sure , if i want to change it ... cuz it will change it type ...etc and it stays as text file even if i write .cs) i have done it b4 , but after i formatted my pc i forgot how to do it , and i cant find any where on internet for it , so plz its simple , thats all i need

and thanks very much for help

#1
07/11/2007 (10:25 pm)
.cs files are text files. They just have another file extension (".cs" instead of ".txt"). If the extension is your problem, just rename it via the explorer. If you use wordpad/notepad and this generates file like "bla.cs.txt", you can either rename those, too, or you can use " around the file name when saving.
Basically TGE recognizes the file extension, which is the only characteristic defining a file as a script file.
#2
07/11/2007 (10:30 pm)
I think you didn't get what i mean , this issue is killing me :S

i mean that when i change the extension to .cs nothing changes i mean , my computer doesn't read the extensions , so i remember i need to go to somewhere on my computer to change that.
#3
07/11/2007 (10:31 pm)
And btw am kinda new to this , and btw am using TGB not TGE if it makes any difference to you.
#4
07/11/2007 (10:42 pm)
You mean you don't see the file extensions? In window open any folder go to extras->folderoptions and turn on show file extensions.

Also you'll get more help if you write coherent sentences and type out the words completely and dont use lazy abbreviations like "rly" and "b4".
#5
07/11/2007 (10:51 pm)
Ok sorry ,

and by the way , i can see like " name.cs " but .cs makes no difference ... i mean its same as you haven't add it at all , i want it to make its effect , thats what i am about.
#6
07/11/2007 (10:58 pm)
Oh i got it , its open any folder and go on :

tools --> folder options ---> go on View tab and uncheck : " hide extensions for known file types "

but thanks ALOT for trying to help guys realy , thank you very much.
#7
07/12/2007 (5:27 am)
I can just type in "script.cs" in notepad and it will save like that, regardless of the choice its giving you in the drop-menu.
#8
07/12/2007 (5:58 am)
You'll also be doing yourself a favor in the long by abandoning the use of notepad. It has a nasty habit of adding binary garbage to your file making unusable. I suggest using a script like Codeweaver or Torsion, or heck even Notepad++ would be better.
#9
07/12/2007 (6:23 am)
I've never had Notepad add crap to the end of my files ever, but I've seen others comment on it in the past. I'm amazed that I haven't seen it, though. Usually its problem is that it does not correctly parse text files created or modified on other OS's. All of the editors mentioned, as well as CrimsonEdit and UltraEdit are much, much better.
#10
07/12/2007 (6:51 am)
I didn't see it for 3 years, then it happened when a co-worker was getting acquainted with TorqueScript and his stuff wouldn't compile at all. For some reason notepad added a line of binary garbage to beginning of the file. What really threw me was that after he had done it I was able to replicate it on my system using a clean script, and I've used notepad for quick edits on test PCs quite a bit in the past without consequence.
#11
07/12/2007 (10:28 am)
I thought it was Wordpad only which did this and that Notepad is completely safe.
#12
07/12/2007 (10:34 am)
I'm pretty sure it was notepad, but I could be getting them mixed up. The last time I saw it happen was about a year ago. I'll see if I can replicate it again.
#13
07/12/2007 (10:46 am)
I've 100% seen it happen in Notepad. It most commonly happens when you fail to change the "file selector" choice from "*.txt (Text Files)" to "*.* (All Files), and then save a file.

What actually happens is a combination of two things:

--Default Windows OS settings are to "hide extensions of known file types", meaning that the .txt portion of the file name is not displayed if .txt has an association with an application (which it does, again by default).

--Notepad uses Window's ability to have multiple "extensions" in file names, and happily appends .txt to all file names if you save as I describe above, giving your TorqueScript files an actual file name of, for example:

main.cs.txt

The problem is that you as the human never see the .txt until you deselect the default of "hide known extensions", and Torque of course isn't going to load in a file without a .cs or .cs.dso as the actual extension.
#14
07/14/2007 (3:41 am)
Theres a drop down box at the bottom of the notepad saving gui

click on it

it should say Text Document(*.txt)

change to all files