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 / Help with File I/O (multiple lines)

Author
Message
Crimson X
16
Years of Service
User Offline
Joined: 28th Nov 2007
Location: New Hampshire
Posted: 22nd Dec 2007 00:31
Hello everyone,

I have a function that gets the Message of the Day from the server, then prints it to the screen. The problem is I can only get the first line to print...



To be honest, someone was kind enough to help me with that, and I do not fully understand how it works, so I tried my own:



This prints all the lines, but all at once. So my question is, how do I change the state of dbText() every time a new line is encountered? I want it to do something like this:

J_C
16
Years of Service
User Offline
Joined: 9th Nov 2007
Location:
Posted: 22nd Dec 2007 17:20
Hi Crimson X

I would suggest that you start you code something like this.
J_C
16
Years of Service
User Offline
Joined: 9th Nov 2007
Location:
Posted: 22nd Dec 2007 17:27
Hi Crimson X
try this...
int x = box_x + 18;
int y = box_y + 30;
(then in your while loop put )
while(!motd.eof())
{
...
...
dbText(x, y, buffer);
y += 12;
}

Login to post a reply

Server time is: 2024-10-08 18:17:53
Your offset time is: 2024-10-08 18:17:53