AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Spielstand speichern mit ini(s)!

Ein Thema von Torley · begonnen am 15. Mär 2008 · letzter Beitrag vom 16. Mär 2008
 
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#10

Re: Spielstand speichern mit ini(s)!

  Alt 16. Mär 2008, 14:25
Lesen kannst du die Profiles dann so:

Delphi-Quellcode:
begin
  // ...
  Profiles := TStringList.Create;
  Profiles.CommaText := ini.ReadString(SECTION_SETTINGS, KEY_PROFILES, '');
  ProfileSelectionListBox.Items.Assign(Profiles);
  ShowMessage('Stored Profiles:' + sLineBreak + Profiles.Text);
  Profiles.Free;
  // ...
end;
Code für das Einlesen eines Profiles brauchst du immer, aber mein Vorschlag zielte auf ein besseres house keeping.

Delphi-Quellcode:
begin
  Profile := TStringList.Create;
  ini.ReadSectionValues(ProfileName, Profile);
  // Player.Points := StrToIntDef(Profile.Values[PROP_POINTS], DEFAULT_POINTS);
  // ...
  Profile.Free;
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:23 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz