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.

AppGameKit Classic Chat / Problem with function..

Author
Message
Mark Garrett
Reviewed AGK on Steam
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 22nd Aug 2017 00:44

I am trying to capture the players name, but all I get is a blank result (see images upload)


.

Attachments

Login to view attachments
Dybing
13
Years of Service
User Offline
Joined: 12th Sep 2011
Location: Bergen, Norway
Posted: 22nd Aug 2017 02:56 Edited at: 22nd Aug 2017 18:38


To get something outside the scope of a function, you either need have it return something, or pass it a pointer (aka pass by reference) to a type. In this case, it returns a string. Also, nesting if's is a very bad idea unless you absolutely have to. In this case, you don't - so I tidied it up a bit. Also your c and state variables didn't do anything, so I just got rid of them.
Mark Garrett
Reviewed AGK on Steam
19
Years of Service
User Offline
Joined: 10th Jul 2005
Location: California, US
Posted: 22nd Aug 2017 21:13
Thanks, yes, that's food for thought.
.

Login to post a reply

Server time is: 2024-11-24 10:00:14
Your offset time is: 2024-11-24 10:00:14