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.

Author
Message
ico2
21
Years of Service
User Offline
Joined: 3rd Jan 2004
Location:
Posted: 22nd Feb 2004 20:03
can anyone tell me what is wrong here, it crashes my game when i use it.


thanks
ico2
John Y
Synergy Editor Developer
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 22nd Feb 2004 22:18
Hi,

Thats one crazy piece of code:

function updatescreen()
for done=1 to 35
if spriteexist(done)=1
sprite done,spritexpos(done),spriteypos(done),frame(done)
else
if sprite exist(done)=1 then delete sprite done
endif
next done
endfunction

1). You need to put a space between sprite and exist on line 3
2). The else part of your if statement won't do anything because at that point sprite exist(done) will *always* equal 0.
3). Change line 4 to: Sprite done,SPRITE X(done),SPRITE Y(done),frame(done)
4). Check that frame(done) returns an existing image.

Level Maker 3D: Download from www.levelmaker3d.co.uk/levelmaker3D.asp
DarkBasic Professional Editor: Download from www.levelmaker3d.co.uk/ide.asp
ico2
21
Years of Service
User Offline
Joined: 3rd Jan 2004
Location:
Posted: 23rd Feb 2004 08:00
spriteexist(*) is an array. the problem is that when this runs the screen flashes and exits to windows without warning..
ico2
21
Years of Service
User Offline
Joined: 3rd Jan 2004
Location:
Posted: 23rd Feb 2004 18:42
spritexpos(*) and sprite ypos(*) are also arrays

Login to post a reply

Server time is: 2025-05-23 04:36:55
Your offset time is: 2025-05-23 04:36:55