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,388 guests, and 6 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
Havent been at this for a long time and forgot how to.... #312083
02/23/10 06:08
02/23/10 06:08
Joined: Apr 2009
Posts: 81
J
JakeBilbe Offline OP
Junior Member
JakeBilbe  Offline OP
Junior Member
J

Joined: Apr 2009
Posts: 81
I haven't been programming in lite-c for ages and this is a really noobie question some might remember me asking lol.

I have recently gotten it to load a entity file (the one thing I always have trouble with) now the entity will load with NULL but if I give it the player_move command it says its undeclared and wont start. How can I fix this?

CODE:
Code:
ENTITY* character;

function main()
{
	video_mode = 8; //This sets the resolution to 1024x768
	level_load("maps/grassland.hmp"); //This loads the map "grassland"
	vec_set(camera.x,vector(-500, 0, 100)); //Sets the spawn place for the camera
	character = ent_create("models/Model2.mdl",vector(-340,0,70),NULL); //Player entity
}



Basically it wont let me give it any other action name like "player, player_move, player_move" the only way I can get the script to run without errors is by calling it NULL.

Last edited by JakeBilbe; 02/23/10 06:52.
Re: Havent been at this for a long time and forgot how to.... [Re: JakeBilbe] #312087
02/23/10 06:41
02/23/10 06:41
Joined: Jan 2002
Posts: 300
Usa
Rich Offline
Senior Member
Rich  Offline
Senior Member

Joined: Jan 2002
Posts: 300
Usa
Do you have a "player_move" function, and is it placed some where in your script before the place where you create the entity?


A8 com / A7 free
Re: Havent been at this for a long time and forgot how to.... [Re: Rich] #312088
02/23/10 06:53
02/23/10 06:53
Joined: Apr 2009
Posts: 81
J
JakeBilbe Offline OP
Junior Member
JakeBilbe  Offline OP
Junior Member
J

Joined: Apr 2009
Posts: 81
Your a life saver, I forgot that the main_function has to be below everything lol cheers.

Re: Havent been at this for a long time and forgot how to.... [Re: JakeBilbe] #312090
02/23/10 07:16
02/23/10 07:16
Joined: Jan 2002
Posts: 300
Usa
Rich Offline
Senior Member
Rich  Offline
Senior Member

Joined: Jan 2002
Posts: 300
Usa
No problem, its always the little things wink


A8 com / A7 free
Re: Havent been at this for a long time and forgot how to.... [Re: Rich] #312098
02/23/10 09:35
02/23/10 09:35
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
just as a remark for future reference.
It's better to use a wait(2) after level_load to make sure the level is properly loaded. Read the manual for more info on that topic.

I usually, just to be safe, use a wait(5).

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/

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