Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,618 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to avoid empty pointer #171208
12/05/07 05:27
12/05/07 05:27
Joined: Sep 2007
Posts: 80
R
ruchen Offline OP
Junior Member
ruchen  Offline OP
Junior Member
R

Joined: Sep 2007
Posts: 80
When the different levels are switching in my demo,the engine sometimes tells me
that ... pointer is empty.So I let the engine wait for some frames when the levels are switching,but if there are many pointers in the levels,how could I do it well?

Re: how to avoid empty pointer [Re: ruchen] #171209
12/05/07 10:56
12/05/07 10:56
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
If you use a pointer, make sure that it is filled:

while(pointer == NULL){wait(1);}

or even shorter:

while(!pointer){wait(1);}

This will pause the function until the pointer is valid.


no science involved
Re: how to avoid empty pointer [Re: fogman] #171210
12/05/07 13:30
12/05/07 13:30
Joined: Sep 2007
Posts: 80
R
ruchen Offline OP
Junior Member
ruchen  Offline OP
Junior Member
R

Joined: Sep 2007
Posts: 80
Yes,you are right.I have used the same method: while(pointer == NULL){wait(1);}
it does well.Thank you.


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