Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/19/24 18:45
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, AndrewAMD, TedMar), 837 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
empty pointers? #130940
05/21/07 14:56
05/21/07 14:56
Joined: Nov 2005
Posts: 232
Maine , United States
D
Dragon6261 Offline OP
Member
Dragon6261  Offline OP
Member
D

Joined: Nov 2005
Posts: 232
Maine , United States
What do you have to do to get rid of empty pointers when you move to another level.

Empty pointer in main;
camera.x = ball.x-700
camera.y = ball.y-120
camera.z = ball.z- 900
player.x = camera.x + 900
and so forth.
the level loads but i get all these empty pointer messages on the way.


Dragonlair Digital Creations http://dragonlairme.tripod.com/
Re: empty pointers? [Re: Dragon6261] #130941
05/21/07 15:12
05/21/07 15:12
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
you must ensure the pointers are != null. just do that in your while-loop.

Re: empty pointers? [Re: Joey] #130942
05/21/07 15:30
05/21/07 15:30
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
What Joey said. For every pointer used in a given function, insert the following line at the beginning of the function. If there aren't any pointers used, then you don't need anything at all:

Code:

while(![pointer name]) { wait(1); }



Change the [pointer name] to the appropriate name minus the brackets (player, camera, etc}. When the pointer is no longer null, the function will execute. Another way is "while([pointer name] != null) { wait(1); }" but I think the way I posted above is "faster."

It's perfectly all right to check for more than one, too. I have functions that use more than pointer, and I check for all of them. Just do this:

Code:

while(![pointer name1] || ![pointer name2]) || ![pointer name3]) { wait(1); }




My User Contributions master list - my initial post links are down but scroll down page to find list to active links

Gamestudio download | chip programmers | 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