Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Cant figure out what's wrong with this code.. #350162
12/14/10 09:33
12/14/10 09:33
Joined: Sep 2010
Posts: 82
P
peteredlin Offline OP
Junior Member
peteredlin  Offline OP
Junior Member
P

Joined: Sep 2010
Posts: 82
Hi, iam kind of new to c-lite script and have read the tutorials, but i still dont see what i do wrong in the next piece of code. It must be something simple i forgot but i cant figure it out so i post...

Code:
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>


var Force = 10;
var fliegwiel_m = 75;
var fliegwiel_r = 0.2;
var krukas_l = 0.3;
var starthoek_krukas;
var draaihoek = 0;
var koppel;
var hoekversnelling;
var traagheidsmomentFliegwiel;

SOUND* dieselhit = "singledieselhit.wav";
 








function hoeksnelheid()
{
	
	while(1)
	{
		koppel = fliegwiel_r * sinv(starthoek_krukas + (draaihoek-180)) * Force;
		hoekversnelling = (koppel/traagheidsmomentFliegwiel)/57;
		draaihoek +=1;
		if(draaihoek == 90)
		{
			snd_play(dieselhit,100,0);
			
		}
		wait(-1/hoekversnelling);
		
	}
	
}

function main()
{ 
	
	traagheidsmomentFliegwiel = (0.5 * fliegwiel_m * fliegwiel_r^2);
	
	starthoek_krukas = acosv(fliegwiel_r/krukas_l);
	hoeksnelheid();
	
}



I get the following error;

MAIN line 49:syntax error:cant convert:XOR:DOUBLE:DOUBLE:LONG

I dont realy undertsand it...

Last edited by peteredlin; 12/14/10 10:14.
Re: Cant figure out what's wrong with this code.. [Re: peteredlin] #350173
12/14/10 10:39
12/14/10 10:39

M
mercuryus
Unregistered
mercuryus
Unregistered
M



fliegwiel_r^2

must be replaced with

pow(fliegwiel_r,2)

Re: Cant figure out what's wrong with this code.. [Re: ] #350176
12/14/10 11:30
12/14/10 11:30
Joined: Sep 2010
Posts: 82
P
peteredlin Offline OP
Junior Member
peteredlin  Offline OP
Junior Member
P

Joined: Sep 2010
Posts: 82
Ok thanks a lot


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