3 registered members (Dico, AndrewAMD, TipmyPip),
16,874
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Bug in the Script Editor
#128673
05/08/07 17:22
05/08/07 17:22
|
Joined: Feb 2006
Posts: 126 USA,
manic7creations
OP
Member
|
OP
Member
Joined: Feb 2006
Posts: 126
USA,
|
This script causes the bug or causes it to shut down. I really need some feedback on this problem, so can somebody please answer my problem. I really need some help on this issue.
////////////////////////////////////////////////////////////////////
var video_mode = 7; // 800x600 pixels var video_depth = 32; // 32 bit mode var x1; var y1;
////////////////////////////////////////////////////////////////////
bmap mouse_pcx = <mouse.pcx>; // bitmap used for the mouse pointer bmap main_pcx = <main.pcx>; // main panel bmap quitclicked_pcx = <quitclicked.pcx>; bmap quitnormal_pcx = <quitnormal.pcx>; bmap quitover_pcx = <quitover.pcx>;
////////////////////////////////////////////////////////////////////
string work05_wmb = <work05.wmb>;
////////////////////////////////////////////////////////////////////
function main() { level_load (work05_wmb); mouse_map = mouse_pcx; mouse_mode = 2; while (1) { mouse_pos.x = pointer.x; mouse_pos.y = pointer.y; x1 = mouse_pos.x; y1 = mouse_pos.y wait (1); } }
function quit_program() { sleep (3); exit; }
//////////////////////////////////////////////////////////////////////
panel main_pan { bmap = main_pcx; pos_x = x1; pos_y = y1; button = 250, 200, quitclicked_pcx, quitnormal_pcx, quitover_pcx, quit_program, null, null; flags = overlay, refresh, visible; }
|
|
|
Re: Bug in the Script Editor
[Re: dblade]
#128675
05/08/07 17:30
05/08/07 17:30
|
Joined: Aug 2006
Posts: 652 Netherlands
bstudio
User
|
User
Joined: Aug 2006
Posts: 652
Netherlands
|
<> can be used too, should work on strings too
BASIC programmers never die, they GOSUB and don't RETURN.
|
|
|
Re: Bug in the Script Editor
[Re: manic7creations]
#128682
05/08/07 18:52
05/08/07 18:52
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
* sleep is a deprecated keyword. Use wait() with negative values instead. * refresh is a deprecated keyword. You can simply omit it.
Besides your script looks correct. Can you give any closer circumstances where the bug occurs?
Always learn from history, to be sure you make the same mistakes again...
|
|
|
|