Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
[b][red]This message was edited by Moderator at 2003-3-16 11:45:49[/red][/b][hr]
[b][red]This message was edited by wizarbo at 2003-3-16 9:17:15[/red][/b][hr]
I red the message poasted below on saving and I was lost. I only took a semester long class in school on programming and we spent about a term on pascal so I dont know everything about pascal. we never learned what those "arrays" were and some other things like types. I am making a game and i want to be able to save so I made a sample code so it wouldn't be so long and I included it below. I have it so it would have 3 slots with names in it but this is not necesary. I just thought that might be easy. I was going to make a text save because i think that you would just make it save like this: "name,money,race" and then recall it but if there is an easier way please tell me!!! So if you could help me out and tell me what some of the things are doing I would really apreatiate it.
Thanks for your time!
writeln('You are ',name);
writeln(name,' is a ',race);
writeln('Your walet containes $,'money);
write('Do you have a character you can load?(y or n)');
if load='y' then
writeln('Select your character.');
if load<>'y' then
write('Enter your name:');
write('What race should you be?');
write('How much money do you want?');
writeln('You are now set, to see crap just type "stats"');
writeln('You may also "save" your character');
writeln('And dont forget how you "quit"');
while move<>'quit' do
write('Tell me what you want to do');
if move='save' then
if move='sats' then
0 · ·