What I need is for the user to enter a numerical value between 2 and 36 (this is to set a server for a game, for which the minimum number of players is 2 and the maximum is 36, the reason im making this application is because we want to use it for league play and nowadays you need to be offering something for people to join your league).
What I came across was this:
function InputBox(const ACaption, APrompt: WideString; ADefault: Integer; Min: Integer = Low(Integer); Max: Integer = High(Integer); Increment: Integer = 1): Integer; overload;
(Excerpt from the Delphi 7 Enterprise helpfile)
It keeps giving me the error String and Integer not compatible.
Any help is appreciated!
BobbaFet ![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
What I came across was this:
function InputBox(const ACaption, APrompt: WideString; ADefault: Integer; Min: Integer = Low(Integer); Max: Integer = High(Integer); Increment: Integer = 1): Integer; overload;
(Excerpt from the Delphi 7 Enterprise helpfile)
Code:
procedure TGRManager.btSetForTAGMatchesClick(Sender: TObject);
var NumPlayers: integer;
begin
NumPlayers := InputBox('Enter the number of players','Enter the number of players that will be joining the server',1,2,36,1);
ShowMessage('Number of players selected: ' + IntToStr(NumPlayers));
end;
It keeps giving me the error String and Integer not compatible.
Any help is appreciated!
![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com