Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Read number from File

Author
Message
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 4th Jan 2009 12:22
Is it me or are the file and dbinput commands broken? I am trying to make a user input an ip address to connect to. In dbpro i was using

It seems that in GDK i can't do it this way. I searched the forums and found that i must use

Ok i tought, hm yeah it ok. Then i tried to use dbVal(ipString); so i could read the value.. Doesn't work.. Tried the following then:

Told me that i cannot convert from char 2 to char (or char * to char 2)....
I said ok, lets try it another way. Made a .txt file named ip with an ip adress, (for now i will say 127.0.0.1). I used

O.o doesn't work.. i bumpted into char *thingi again ! Isn't there anyway to "detour" this? Because it really, pardon me, s*ks... Searched the documentation and i got even more confused . Please give me a hand guys
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 4th Jan 2009 16:37
o.o no sugestion? *sniff*
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 4th Jan 2009 18:03
I know you play around with my DarkGDK oop thing - in the USGS code, there is code that uses DarkGDK file commands to load binary files...

I have code that reads in text files and parse too there - the *.hdr files for the USGS terrain GRIDFLOAT files have a text header I have to parse.

for the input - I have a GUI - and even if you don't use the gui - hunt the code for the dbEntry function name so you can see how I implemented it. The buffering its suppose to do does work but its gets weird when you need that plus keys like CNTL ALT etc.

--Jason

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 4th Jan 2009 20:40
@ZAP - Sorry for double post - this is command to force on the hardware mouse in JGC:

JGC::UserInput->MouseVisible_Set(true);

zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 4th Jan 2009 21:13
Thanks, i needed it before. Thank you Jason.
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 5th Jan 2009 08:59
Things like IP numbers and port numbers should always be backed up within an *.INI type of file so that a person does not ALWAYS have to enter in values if they do not happen to change from one game play to the next game play.

I like to use an extension of *.SET rather than *.INI because Vista does nor mess up the settings in this extension, where it does play with INI files.

Here is my network setup function from what you may pull out a few ideas if you are interested.

Login to post a reply

Server time is: 2024-11-25 11:34:06
Your offset time is: 2024-11-25 11:34:06