Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant), 5,825 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: integer test result [Re: Excessus] #146778
08/13/07 00:45
08/13/07 00:45
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline OP
User
Ottawa  Offline OP
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi Excessus!

Yes I'm getting crashes. Most of the crashes are in my level 3.

The line in the preceding message is not working
It is never true.
I can't use //! or breakpoint; to find out why
because the breakpoint is not recognized...
When I put debug_mode in main (is it where it's supposed to be?)
I got a blank screen and ESC did not work, so I had to reset my computer.

A sections of the script code that (as far as I know) is the same in
Cscript and Lite C made a function crash.

At this time I'm thinking it's my fault so I keep on reading
and trying different things.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: integer test result [Re: Ottawa] #146779
08/13/07 09:13
08/13/07 09:13
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Entity skills are of var type. You can look it up in the header fiels of the sdk:

Code:

typedef struct ENTITY {
... // or view pointer for a layer entity
var skill[100]; // entity skills (skills > 40 only available for A6.2 or above)
...
} ENTITY;



Your crash problem might have to do with some later part in your script.

One lesson I learned: While C-Script ignored calls of empty function pointers, Lite-C crashes . You have to do a NULL comaprison before calling the function pointer.
It gave me a headache until I found out what is causing the crashes...

Re: integer test result [Re: FBL] #146780
08/13/07 22:49
08/13/07 22:49
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline OP
User
Ottawa  Offline OP
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi !
Just to let you know that the line that was giving me a problem :
if (var_green == MyEntity.skill16) {}

is now

if (MyEntity.skill[15] == var_green) {}


I’ve also changed all the other .skill16 to .skill[15]
I know that skill16 is the same as skill[15] but for some reason they are processed differently.


Firoball

Quote:

You have to do a NULL comparison before calling the function pointer.





Could you give me a short example of what yours saying here.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: integer test result [Re: Ottawa] #146781
08/14/07 09:59
08/14/07 09:59
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Code:

function* funcptr;

function test()
{
if (funcptr != NULL) funcptr();
...
}




Re: integer test result [Re: FBL] #146782
08/14/07 15:13
08/14/07 15:13
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline OP
User
Ottawa  Offline OP
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Thanks Firoball

I'll be experimenting with this code and get back to you.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1