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 / Problem for converting some code

Author
Message
Franck22000
15
Years of Service
User Offline
Joined: 7th May 2009
Location:
Posted: 1st Sep 2009 16:34
Hello i would like to convert this piece of dbpro code to GDK but i cant to it properly :s


I would like to achieve that: http://forum.thegamecreators.com/?m=forum_view&t=140441&b=18






There is my first attemps but it fail





Compiling is ok but ingame the result is bad

"if limb<>t"

What is the <> symbol ???


I hope someone will be able to help thanks !
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Sep 2009 17:39
Quote: "What is the <> symbol???"


In Basic that means not equal to. In C++ you use !=

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Franck22000
15
Years of Service
User Offline
Joined: 7th May 2009
Location:
Posted: 1st Sep 2009 17:44
Thanks, so this is what im using but it doesent work with that
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 1st Sep 2009 18:32 Edited at: 1st Sep 2009 18:33
1) There's a problem with the second for loop.



Will never loop because _i2 will never start out as being 1, and the for loop stops if _i2 is not 1, so the for loop ends before it starts, and the code inside is never reached. Probably just a simple mistake.


2) Use brackets for multi-line if statements. Unless brackets are used, only the line after (or on the same line as) an else or an if are included.



Your_Health = (My_Mood == HAPPY) ? 100 : NULL;
Franck22000
15
Years of Service
User Offline
Joined: 7th May 2009
Location:
Posted: 1st Sep 2009 19:06
Thanks for the answer, so how convert this to C++:

for limb = totallimbs-1 to 1 step -1

If you have any other ID to convert limb of a level to independant object dont hesitate
Franck22000
15
Years of Service
User Offline
Joined: 7th May 2009
Location:
Posted: 1st Sep 2009 19:11
ideas not ID (god im programming to much )
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Sep 2009 19:19
for (limb = totallimbs-1; limb >= 1; limb--)

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 1st Sep 2009 20:23
for (int limb = totallimbs-1; limb >= 1; limb--)

limb is not declared otherwise

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Sep 2009 20:38
Old school thinking, back to C. I was assuming that it was declared within scope someplace, just not necessarily within the visible code.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-10-01 12:38:51
Your offset time is: 2024-10-01 12:38:51