User Profile
Collapse
-
My class is only a grade 12 class, so I don't pay for it. And it's not that I don't know how to initilze objects, it's just I'm trying to initilize a global object array, but whatever I've tried, doesnt work. -
Can't input to a global object array
Hi,
So I'm making my final project for my CS class. I'm making a pokemon game.
So right now I'm trying to input information(The pokemon the player has) into my array of objects(The list of pokemon the player has). I have the array in a global class so every form can access it. I have it declared as;
Code:public class GlobalVariables { public static PlayerPokemon[] PlayerPokemonList =
Last edited by tlhintoq; Jan 10 '10, 12:30 AM. Reason: [cODE] ...Your code goes between code tags [/CODE] -
Thanks for replying
Thanks for replying. Well I guess that means I am gonna have to do some changes :/. But thanks for the answer, cause if u didn't tell me I would have probably spend forever trying to fix the problem.Leave a comment:
-
Code I am using
Thanks for answer, I've tried like 3 other websites and not even a reply!
Ok so here is the code I declare publicly :
Assembly _assembly;
StreamReader _textStreamRead er;
Here is the code I read with :
try
{
_assembly = Assembly.GetExe cutingAssembly( );
_textStreamRead er = new StreamReader(_a ssembly.GetMani festResourceStr eam("WindowsApp lication2.Resou rces.Stats.txt" ));...Leave a comment:
-
Write to a embedded text file?
Hi,
I am trying to make a game, where the player can save their stats. So far I've got it so the text file can be read, so loading the game, but I cannot figure out out how write to the text file, so saving the game. I have tried changing the code of StreamRead to StreamWrite, but it comes up with an error.
No activity results to display
Show More
Leave a comment: