Int and Str usagePosted by Joey on June 10, 2003 at 22:08:14: How do i use an interger in a string? What i mean is that; i'm making a kinda game where you fiddle with a population of people and control things they do! So that you can use cheats i want to use a string then an integer... So it would be like this (what would be typed to cheat): Populate: 7889 This setting the population to 7889 (if you need to know it sets a hidden spinedit.value to this number) i want to check it says 'populate: ' then if thats there it checks the int after it and sets the spinedit.value to that! At the moment i have but i dont know what to do with anything about the int: procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin IF edit1.text = 'populate: ' then spinedit1.value := ??? else label1.caption := 'Cheat Unkown or not sufficent information'; end; Please could you help me set spinedit1.value to a number following 'populate: '? Thanks ;), Joey
[ DelphiLand: free Delphi source code, tips, tutorials ] |
|