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.

DarkBASIC Professional Discussion / I am so stupid! Please help

Author
Message
Gilfalas
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Luxembourg
Posted: 5th Feb 2003 01:32
Hi

please help on this code. It worked fine, until I added an another array and tried to use it. Please focuse on the subroutine called _makeennemies. There is a line of code (after REM Here's the problem) that should print out a value different from 0.

SET CURSOR 10,10
REM HERE's the Problem
PRINT ennemyarray(z,4) -50 then POSITION OBJECT myfighter,OBJECT POSITION X(myfighter),OBJECT POSITION Y(myfighter),(OBJECT POSITION Z(myfighter))-1
IF JOYSTICK LEFT()=1 AND (OBJECT POSITION X(myfighter))>-70
IF zrotate-30 then zrotate=zrotate-1
ZROTATE OBJECT myfighter,zrotate
POSITION OBJECT myfighter,OBJECT POSITION X(myfighter)+1,OBJECT POSITION Y(myfighter),OBJECT POSITION Z(myfighter)
ENDIF
IF JOYSTICK LEFT()=0 AND zrotate>0
ZROTATE OBJECT myfighter,zrotate
zrotate=zrotate-2
ENDIF
IF JOYSTICK RIGHT()=0 AND zrotate=1 AND objecthit-ennemynames=120 AND OBJECT EXIST(x+bulletnames)=1
bulletarray(x,1)=0
DELETE OBJECT x+bulletnames
ENDIF
POSITION OBJECT x+bulletnames,bulletarray(x,3),0,bulletarray(x,2)

next x
RETURN



_makeennemies:
REM ennemyarray alive(1),zcoord(2),xcoord(3),type(4),fzen(5),fxen(6),hp(7),formula(8)



for y=1 to ennemiesonlevel

if alennemy(y,2)
Gilfalas
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Luxembourg
Posted: 5th Feb 2003 01:37
Sorry code snippet did not work... I'll try again

Gilfalas
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Luxembourg
Posted: 5th Feb 2003 01:38


Gilfalas
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Luxembourg
Posted: 5th Feb 2003 02:56
Never mind...as I said I am stupid! Found my mistake...

Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 5th Feb 2003 03:01
You're not stupid, that code's a lot better constructed than many ppl who post here, and you've attempted to do it yourself not just expected every1 to do it for you - well done

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
[email protected] - http://www.kangaroo2.com - If the apocalypse comes, email me
Gilfalas
22
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Luxembourg
Posted: 5th Feb 2003 03:42
Thanks... it's always nice to get positive feedback from fellow coders.

Have fun.

Login to post a reply

Server time is: 2025-05-20 01:57:24
Your offset time is: 2025-05-20 01:57:24