| Page 1 of 1 |
|
|
|
| Back to top |
|
 |
|
|
Posted: Sat, 14th Jan 2012 19:52 Post subject: |
|
 |
Ok Ive rewrited it for C# and corrected all the errors I could somehow. There is only 1 error left in the main class.
"The type or namespace name 'NullPointerException' could not be found (are you missing a using directive or an assembly reference?)"
it is referring to this line of code. It is at the end
" try
{
for (int i = 0; i < maszyny.Length; i++)
{
maszyny[i].wyswietl();
}
}
catch (NullPointerException e)
{
}"
[/u]
I have no idea what to input there. Google doesnt help. Finally doesnt help. NOTHING. its c#
3080 | ps5 pro
Sin317-"im 31 years old and still surprised at how much shit comes out of my ass actually ..."
SteamDRM-"Call of Duty is the symbol of the true perfection in every aspect. Call of Duty games are like Mozart's/Beethoven's symphonies"
deadpoetic-"are you new to the cyberspace?"
|
|
| Back to top |
|
 |
Werelds
Special Little Man
Posts: 15098
Location: 0100111001001100
|
Posted: Sat, 14th Jan 2012 19:58 Post subject: |
|
 |
NullReferenceException would be the one in C# I think, assuming the Java one is what I think it is.
|
|
| Back to top |
|
 |
|
|
Posted: Sat, 14th Jan 2012 20:06 Post subject: |
|
 |
nope. Same error
NullPointerException is the java command
3080 | ps5 pro
Sin317-"im 31 years old and still surprised at how much shit comes out of my ass actually ..."
SteamDRM-"Call of Duty is the symbol of the true perfection in every aspect. Call of Duty games are like Mozart's/Beethoven's symphonies"
deadpoetic-"are you new to the cyberspace?"
|
|
| Back to top |
|
 |
|
|
Posted: Sat, 14th Jan 2012 20:31 Post subject: |
|
 |
How about:
catch(System.NullReferenceException e)
Also try to clean and rebuild the project. Could be that some precompiled code is messed up.
Last edited by me7 on Sat, 14th Jan 2012 20:32; edited 1 time in total
|
|
| Back to top |
|
 |
Werelds
Special Little Man
Posts: 15098
Location: 0100111001001100
|
|
| Back to top |
|
 |
|
|
Posted: Sat, 14th Jan 2012 20:31 Post subject: |
|
 |
fixed it (i think) it should be:
catch (NullReferenceException e)
{
Console.WriteLine("{0} Caught exception #1.", e);
}
tho program is doing only half of its task and then stops without error. it works good in java tho...
3080 | ps5 pro
Sin317-"im 31 years old and still surprised at how much shit comes out of my ass actually ..."
SteamDRM-"Call of Duty is the symbol of the true perfection in every aspect. Call of Duty games are like Mozart's/Beethoven's symphonies"
deadpoetic-"are you new to the cyberspace?"
|
|
| Back to top |
|
 |
Werelds
Special Little Man
Posts: 15098
Location: 0100111001001100
|
Posted: Sat, 14th Jan 2012 20:37 Post subject: |
|
 |
That's exactly what both me7 and I said? 
|
|
| Back to top |
|
 |
|
|
Posted: Sat, 14th Jan 2012 20:46 Post subject: |
|
 |
|
|
|
| Back to top |
|
 |
|
|
|
| Back to top |
|
 |
| Page 1 of 1 |
All times are GMT + 1 Hour |