Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Richard MacCutchan13-Mar-19 23:52
mveRichard MacCutchan13-Mar-19 23:52 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion13-Mar-19 23:59
Brian_TheLion13-Mar-19 23:59 
GeneralRe: Trying to find the problem in this simple C$ program Pin
OriginalGriff14-Mar-19 0:28
mveOriginalGriff14-Mar-19 0:28 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Richard MacCutchan14-Mar-19 1:51
mveRichard MacCutchan14-Mar-19 1:51 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion14-Mar-19 0:28
Brian_TheLion14-Mar-19 0:28 
GeneralRe: Trying to find the problem in this simple C$ program Pin
OriginalGriff14-Mar-19 0:44
mveOriginalGriff14-Mar-19 0:44 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion14-Mar-19 1:09
Brian_TheLion14-Mar-19 1:09 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion14-Mar-19 1:19
Brian_TheLion14-Mar-19 1:19 
Hi Griff.

I have not had time to make your suggested changes yet.

I seem to have run into another problem as sr is not accepted in the code below.
I tried prog.sr but that does not work.

Brian

public static void Main(string[] args)
{
Program prog = new Program();
StreamReader sr = new StreamReader("demo.adv");


Console.WriteLine("Start of Program");
prog.y = 4;
prog.ReadHeader();
Console.WriteLine(prog.i);
prog.ReadVerbs();
prog.ReadNouns();
prog.ReadObjects();
prog.ReadStartRoom();
prog.ReadRooms();
prog.ReadMessages();
prog.ReadAutoActions();
prog.ReadActions();
sr.Close();
Console.Read();

}
public void ReadHeader()
{
Console.WriteLine("Read Header");
Text1 = sr.ReadLine(); // sr has a red line under (error)


Console.WriteLine(y);
i = 6;
}
GeneralRe: Trying to find the problem in this simple C$ program Pin
Richard MacCutchan14-Mar-19 1:54
mveRichard MacCutchan14-Mar-19 1:54 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion14-Mar-19 1:57
Brian_TheLion14-Mar-19 1:57 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Richard MacCutchan14-Mar-19 2:16
mveRichard MacCutchan14-Mar-19 2:16 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion14-Mar-19 2:22
Brian_TheLion14-Mar-19 2:22 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Richard MacCutchan14-Mar-19 2:25
mveRichard MacCutchan14-Mar-19 2:25 
GeneralRe: Trying to find the problem in this simple C$ program Pin
OriginalGriff14-Mar-19 2:01
mveOriginalGriff14-Mar-19 2:01 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion14-Mar-19 2:13
Brian_TheLion14-Mar-19 2:13 
GeneralRe: Trying to find the problem in this simple C$ program Pin
OriginalGriff14-Mar-19 2:31
mveOriginalGriff14-Mar-19 2:31 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion14-Mar-19 12:27
Brian_TheLion14-Mar-19 12:27 
GeneralRe: Trying to find the problem in this simple C$ program Pin
OriginalGriff14-Mar-19 21:59
mveOriginalGriff14-Mar-19 21:59 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion14-Mar-19 23:43
Brian_TheLion14-Mar-19 23:43 
GeneralRe: Trying to find the problem in this simple C$ program Pin
OriginalGriff14-Mar-19 23:47
mveOriginalGriff14-Mar-19 23:47 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion15-Mar-19 0:53
Brian_TheLion15-Mar-19 0:53 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Brian_TheLion14-Mar-19 1:40
Brian_TheLion14-Mar-19 1:40 
QuestionRe: Trying to find the problem in this simple C$ program Pin
Luc Pattyn14-Mar-19 7:09
sitebuilderLuc Pattyn14-Mar-19 7:09 
AnswerRe: Trying to find the problem in this simple C$ program Pin
OriginalGriff14-Mar-19 7:24
mveOriginalGriff14-Mar-19 7:24 
GeneralRe: Trying to find the problem in this simple C$ program Pin
Luc Pattyn14-Mar-19 8:02
sitebuilderLuc Pattyn14-Mar-19 8:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.