Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 692 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Error E1513 on Knights on Wheels sample #427974
08/16/13 03:23
08/16/13 03:23
Joined: Aug 2011
Posts: 42
F
fabiomartins Offline OP
Newbie
fabiomartins  Offline OP
Newbie
F

Joined: Aug 2011
Posts: 42
I,m trying compiling knights_on_wheels.c
but the engine returns:
Error E1513
Script crash in car_noise

Re: Error E1513 on Knights on Wheels sample [Re: fabiomartins] #428357
08/25/13 16:55
08/25/13 16:55
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
What compiler do you use, A7 or A8?


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: Error E1513 on Knights on Wheels sample [Re: rojart] #428358
08/25/13 18:17
08/25/13 18:17
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
This is the function where it crashes:
Code:
function car_noise(ENTITY* car,SOUND* sndEngine,SOUND* sndTire,SOUND* sndCrash)
{
// use skills for the sound handles, to handle them individually per car
	if(!car.car_hEngine) 
		car.car_hEngine = ent_playloop(car,sndEngine,100);
	
// tune engine sound according to speed and acceleration		
	if(car.car_hEngine) {
		var freq = 80
			+ 200*abs(car.car_speed/car.car_maxSpeed) 
			+ 100*abs(car.car_torque/car.car_maxTorque);
		snd_tune(car.car_hEngine,100,freq,0);  //80% of real frequency
	}
	
// play tire sound when tires are slipping 	
	if(!snd_playing(car.car_hTire)) {
		if(car_wheelslip(car))
			car.car_hTire = ent_playloop(car,sndTire,100);
	} else {
		if(!car_wheelslip(car)) {
			snd_stop(car.car_hTire);
			car.car_hTire = 0;
		}
	}
	
// play crash sound on abrupt speed changes	or when car topples	
	static var last_speed = 0;
	static var last_roll = 0;
	if((abs(last_speed) > tcar_crashSpeed &&
		abs(last_speed-car.car_speed) > tcar_crashSpeed)
		|| (abs(last_roll) < 90 && abs(car.roll) > 90))
	{
		ent_playsound(car,sndCrash,200);
	}
	last_speed = car.car_speed;
	last_roll = car.roll;		
}



probably car is NULL or something. Also the engine version would help like rojart asked before laugh


Moderated by  HeelX, Spirit 

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