Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,485 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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 | 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