Hey guys, I noticed that CreateBullet returns an integer value. A quick test:
procedure activateserver();
var c,pos:integer;
begin
repeat
c := createbullet(0,0,50,50,150,14,pos);
writeln('Bullet #'+inttostr(pos)+' returned: '+inttostr(c));
inc(pos,1);
until pos > 32;
end;
Result:
13-05-31 23:34:29 Bullet #0 returned: -1
13-05-31 23:34:29 Bullet #1 returned: 1
13-05-31 23:34:29 Bullet #2 returned: 2
13-05-31 23:34:29 Bullet #3 returned: 3
13-05-31 23:34:29 Bullet #4 returned: 4
13-05-31 23:34:29 Bullet #5 returned: 5
13-05-31 23:34:29 Bullet #6 returned: 6
13-05-31 23:34:29 Bullet #7 returned: 7
13-05-31 23:34:29 Bullet #8 returned: 8
13-05-31 23:34:29 Bullet #9 returned: 9
13-05-31 23:34:29 Bullet #10 returned: 10
13-05-31 23:34:29 Bullet #11 returned: 11
13-05-31 23:34:29 Bullet #12 returned: 12
13-05-31 23:34:29 Bullet #13 returned: 13
13-05-31 23:34:29 Bullet #14 returned: 14
13-05-31 23:34:29 Bullet #15 returned: 15
13-05-31 23:34:29 Bullet #16 returned: 16
13-05-31 23:34:29 Bullet #17 returned: 17
13-05-31 23:34:30 Bullet #18 returned: 18
13-05-31 23:34:30 Bullet #19 returned: 19
13-05-31 23:34:30 Bullet #20 returned: 20
13-05-31 23:34:30 Bullet #21 returned: 21
13-05-31 23:34:30 Bullet #22 returned: 22
13-05-31 23:34:30 Bullet #23 returned: 23
13-05-31 23:34:30 Bullet #24 returned: 24
13-05-31 23:34:30 Bullet #25 returned: 25
13-05-31 23:34:30 Bullet #26 returned: 26
13-05-31 23:34:30 Bullet #27 returned: 27
13-05-31 23:34:30 Bullet #28 returned: 28
13-05-31 23:34:30 Bullet #29 returned: 29
13-05-31 23:34:30 Bullet #30 returned: 30
13-05-31 23:34:30 Bullet #31 returned: 31
13-05-31 23:34:30 Bullet #32 returned: -1
It became even less understandable when I tried this:
procedure activateserver();
var c,pos:integer;
begin
repeat
c := createbullet(0,0,50,50,150,14,1);
writeln('Bullet #'+inttostr(pos)+' returned: '+inttostr(c));
inc(pos,1);
until pos > 32;
end;
->
13-05-31 23:38:15 Bullet #0 returned: 1
13-05-31 23:38:15 Bullet #1 returned: 2
13-05-31 23:38:15 Bullet #2 returned: 3
13-05-31 23:38:15 Bullet #3 returned: 4
13-05-31 23:38:15 Bullet #4 returned: 5
13-05-31 23:38:15 Bullet #5 returned: 6
13-05-31 23:38:15 Bullet #6 returned: 7
13-05-31 23:38:15 Bullet #7 returned: 8
13-05-31 23:38:15 Bullet #8 returned: 9
13-05-31 23:38:15 Bullet #9 returned: 10
13-05-31 23:38:15 Bullet #10 returned: 11
13-05-31 23:38:15 Bullet #11 returned: 12
13-05-31 23:38:15 Bullet #12 returned: 13
13-05-31 23:38:15 Bullet #13 returned: 14
13-05-31 23:38:15 Bullet #14 returned: 15
13-05-31 23:38:15 Bullet #15 returned: 16
13-05-31 23:38:15 Bullet #16 returned: 17
13-05-31 23:38:15 Bullet #17 returned: 18
13-05-31 23:38:15 Bullet #18 returned: 19
13-05-31 23:38:15 Bullet #19 returned: 20
13-05-31 23:38:15 Bullet #20 returned: 21
13-05-31 23:38:15 Bullet #21 returned: 22
13-05-31 23:38:15 Bullet #22 returned: 23
13-05-31 23:38:15 Bullet #23 returned: 24
13-05-31 23:38:15 Bullet #24 returned: 25
13-05-31 23:38:15 Bullet #25 returned: 26
13-05-31 23:38:15 Bullet #26 returned: 27
13-05-31 23:38:15 Bullet #27 returned: 28
13-05-31 23:38:15 Bullet #28 returned: 29
13-05-31 23:38:15 Bullet #29 returned: 30
13-05-31 23:38:15 Bullet #30 returned: 31
13-05-31 23:38:15 Bullet #31 returned: 32
13-05-31 23:38:15 Bullet #32 returned: 33