[Mono-osx] Weird Path Error

Dimensional Dan daniel at alph-art.com.au
Tue Oct 14 20:38:00 EDT 2008


I get the same error whenever I use
Console.Readline()

I am also on a mac here is the offending code:

public static void Main(string[] args)
		{
			int chips = 0;  
                        // this code produces this error: 
                        //Unhandled Exception: 
System.ArgumentNullException: Argument cannot be null.
                        //Parameter name: s

			chips = GameInit(); //welcome user to game, get the amount of money...
			DrawDice(6);
			DrawDice(4);

		}
	}

Here's the method GameInit:

		public static int GameInit() 
		{
			int chips = 0;
			string input ="";
			input = Console.ReadLine();
			chips = int.Parse(input);
			return (chips);
		}

It all works fine under the MS IDE on 2003 server...



Eoin Norris wrote:
> 
> Can you debug this code? Or printf it? Is it yours?
> 
> Clearly something in this call
> 
>   at LotROLinux.MainWindow.InitialSetup ()
> 
> is passing an invalid ( or null) path to the DirecotyInfo constructor.  
> we cant really help unless we know what, exactly. It may be that it is  
> passing a path that is invalid on the Mac.
> 
> -- Eoin
> 
> 
> On 7 Jun 2008, at 03:18, djet13 wrote:
> 
>>
>> Either I'm stupid or the fact that I'm on a Mac is hindering me from
>> understanding this....
>>
>> I'm simply doing mono lotrolinux.run then getting that error. I  
>> havn't done
>> anything with DirectoryInfo....
>>
>> Is there some Config thing that I could change?
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Weird-Path-Error-tp17699812p17704524.html
>> Sent from the Mono - OSX mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Mono-osx mailing list
>> Mono-osx at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-osx
> 
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
> 
> 

-- 
View this message in context: http://www.nabble.com/Weird-Path-Error-tp17699812p19969279.html
Sent from the Mono - OSX mailing list archive at Nabble.com.



More information about the Mono-osx mailing list