The Daily Click ::. Forums ::. Klik Coding Help ::. An odd TGF syntax error
 

Post Reply  Post Oekaki 
 

Posted By Message

Weston L



Registered
  16/12/2002
Points
  1603
9th March, 2004 at 14:23:40 -

I'm trying to set the value of an INI to this:

( value( "current score" ) / 3 )^2 - 3

and I get a syntax error. Any ideas why?

 
n/a

Nick of All Trades

Possibly Insane

Registered
  03/09/2002
Points
  2312

Game of the Week Winner
9th March, 2004 at 14:33:57 -

Try
(value( "current score")/3)*(value( "current score")/3)- 3

WHY didn't you try that before before posting your problems here?

 
n/a

Weston L



Registered
  16/12/2002
Points
  1603
9th March, 2004 at 15:18:57 -

Why didn't I? Well first it's important to know how to use these basic calculations for example, what if one day I wanted to do:

(value("current score" )/3)^(value("other counter") - 3

And also, the little amount of webspace my question took up on TDC is not something to be too concerned about. 157 bytes.

Thanks for your help by the way.

Image Edited by the Author.

 
n/a

jast



Registered
  03/01/2014 01:12:19
Points
  186
9th March, 2004 at 17:11:56 -

If one day you wanted to do that, you could just start a small loop that multiplies the value with itself n times. Easy.

 
n/a

Mr Icekirby



Registered
  18/12/2003
Points
  846
9th March, 2004 at 17:34:04 -

yeah

 
Mr Icekirby says so!
OBEY ME!

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
9th March, 2004 at 22:29:46 -

I don't remember TGF or MMF liking the ^ sign... that might be the problem (though I doubt it).

 
http://www.klik-me.com

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
10th March, 2004 at 00:38:04 -

I think the Advanced Maths object comes with a POW function that lets you do what you're trying to do. Less code than using loops, and would no doubt be faster since I'm pretty sure it would have been programmed to use CPU processes rather than relying on a loop within the software itself. It's up to you, personally I dont like using extensions made by other people, but it does make things easier

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert
   

Post Reply



 



Advertisement

Worth A Click