Search found 7 matches

by louisharrodine
Tue Feb 19, 2013 11:45 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using the 'effective filename' function
Replies: 2
Views: 2595

Re: Using the 'effective filename' function

Thanks a lot for your reply - just put it all in, and it's working perfectly.

Thanks again.
by louisharrodine
Tue Feb 19, 2013 11:22 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Using the 'effective filename' function
Replies: 2
Views: 2595

Using the 'effective filename' function

Hi there,

at the moment, this is my code:

Put effective filename of this stack & "/Records.txt" into Filedirectory

which puts C:/livecodethings/todo.livecode/Records.txt into the variable 'Filedirectory'

I want it to put : C:/livecodethings/Records.txt into the variable 'Filedirectory'
so I ...
by louisharrodine
Tue Nov 20, 2012 11:47 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to round up to nearest whole number
Replies: 2
Views: 4402

How to round up to nearest whole number

Hi there,

I'm dealing with various decimal numbers:

4.6736583758
28.01392764

etc


How would I round numbers such as these up to the nearest whole number? thanks
by louisharrodine
Fri Nov 02, 2012 12:19 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Multiplying with 2-d arrays
Replies: 10
Views: 7595

Re: Multiplying with 2-d arrays

Hi,

Thanks alot for all of your help!

After trying both versions extensively, I've decided to stick mainly with arrays, but it's ended up as bit of a hydbrid anyway.

Thanks again for all your help,
Louis
by louisharrodine
Wed Oct 31, 2012 7:13 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Multiplying with 2-d arrays
Replies: 10
Views: 7595

Re: Multiplying with 2-d arrays

Hi there,

@Mark:

I thought that as well, so I put in the "if bigarray[loop][1] = 0 or bigarray[loop][2]" "put 0 into kmphour[loop][1]. So I'd thought that if bigarray[loop][2] was empty, it would go through the IF statement?


@Bernd

Thanks a lot for your reply. I had a full look over your code ...
by louisharrodine
Wed Oct 31, 2012 3:19 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Multiplying with 2-d arrays
Replies: 10
Views: 7595

Re: Multiplying with 2-d arrays

Hi, thanks for your replies.

Line 132 is this part of the code:
put bigarray[loop][1]/(bigarray[loop][2]*60) into kmphour[loop][1]



And this is the entire program:

on mouseUp

#Define variables to be passed
local filedirectory, n, bigarray, temp

read_from_file filedirectory, n, bigarray ...
by louisharrodine
Tue Oct 30, 2012 11:45 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Multiplying with 2-d arrays
Replies: 10
Views: 7595

Multiplying with 2-d arrays

Hi there,

This is my code: where n = the number of elements in the array "bigarray"



repeat with loop = 0 to n - 1
put bigarray[loop][0] into kmphour[loop][0]
if bigarray[loop][1] = 0 or bigarray[loop][2] = 0 then
put 0 into kmphour[loop][1] -- If either value = 0, the speed with also be 0 ...