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 / String problems....

Author
Message
wickedly kick it
18
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 24th Jul 2009 23:56 Edited at: 24th Jul 2009 23:57
my error codes:




Heres my main.cpp:


and heres my NPC.H:


How is it going
17
Years of Service
User Offline
Joined: 18th Sep 2007
Location: California
Posted: 25th Jul 2009 00:01 Edited at: 25th Jul 2009 00:02
I think you need to do it like this:
dbPrint ( dbStr (dave.dialouge));
I haven't tested that but I think it will work.
[Edit]
did you include the strings header file?
wickedly kick it
18
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 25th Jul 2009 00:05
I included <string>. And the dbStr(); is for converting floats and integers into strings.

Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 25th Jul 2009 00:15 Edited at: 25th Jul 2009 00:17
Use dave.dialogue().c_str()

http://www.cplusplus.com/reference/string/string/c_str/

Your_Health = (My_Mood == HAPPY) ? 100 : NULL;
wickedly kick it
18
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 25th Jul 2009 00:20
I still got the same error with the dave.dialoge().c_str()

prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 25th Jul 2009 00:21
do this then "(char *)dave.dialoge().c_str()"


Your signature has been erased by a mod
wickedly kick it
18
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 25th Jul 2009 00:25
Brand new set of errors!


0_0 i liked the other ones better.

Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 25th Jul 2009 00:27
http://forum.thegamecreators.com/?m=forum_view&t=154012&b=22

Read my post (the second one)

Your_Health = (My_Mood == HAPPY) ? 100 : NULL;
wickedly kick it
18
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 25th Jul 2009 00:30
Thank you all! I love you Bran flakes!!!!!!!!!

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 25th Jul 2009 00:36 Edited at: 25th Jul 2009 00:37
i think bran's method to solve the linking problems should be a sticky topic, since alot of people are having this problem

http://img268.imageshack.us/img268/3640/signatureugo.jpg
Game 2D EXP
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location: Ho Chi Minh city
Posted: 25th Jul 2009 05:35
You should use char* instead of string, because std namespace does not work normally in DarkGDK project.
Or you can do like this:
- Alt + F7 -> Configuration Properties -> C/C++ -> Code Generation
- Change the Runtime Library to /MT instead of /MTd

Have fun ^^

^^
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 25th Jul 2009 13:23
Quote: "You should use char* instead of string, because std namespace does not work normally in DarkGDK project."


That's not a good reason to not use it, especially considering how easy the issue is to fix.

Login to post a reply

Server time is: 2024-10-01 08:36:42
Your offset time is: 2024-10-01 08:36:42