This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
KingOfAllChunks's profile picture

i=1 , i=n , n is NIL?

Started by KingOfAllChunks, 06 March 2014 - 05:18 PM
KingOfAllChunks #1
Posted 06 March 2014 - 06:18 PM
Hello again. Today i've been working alot for a new script i plan to upload later. But i stumbled upon a FATAL issue. I need to transfer the data from one variable to another, and then erase the first one for REASONS. But i cant…. I'm having this code (yep i still cant use the "code" function in these forums) : i=5 (next line) n=0 (next line) i=n (next line) i=0 .The problem is when i try to use "n", it is still a nil value… Any ideas? Tried with n=return(i), not very successful…
Thanks for any replies
Lyqyd #2
Posted 06 March 2014 - 06:27 PM
Please post your code.
CometWolf #3
Posted 06 March 2014 - 06:28 PM
Just to clarify, 0 and nil is not the same.

To copy i to n you would do
n = i, not i = n.
KingOfAllChunks #4
Posted 06 March 2014 - 06:36 PM
Just to clarify, 0 and nil is not the same.

To copy i to n you would do
n = i, not i = n.
thanks! It worked! YAY
Please post your code.
the code is 1200+ lines and is very confusing to be posted.. and my problem is fixed now…
sci4me #5
Posted 06 March 2014 - 10:22 PM
Just to clarify, 0 and nil is not the same.

To copy i to n you would do
n = i, not i = n.
thanks! It worked! YAY
Please post your code.
the code is 1200+ lines and is very confusing to be posted.. and my problem is fixed now…
then only post the part in question lol
theoriginalbit #6
Posted 06 March 2014 - 11:07 PM
yep i still cant use the "code" function in these forums
you can use the "code function" by typing the [code][/code] tags manually.
KingOfAllChunks #7
Posted 07 March 2014 - 11:28 AM
yep i still cant use the "code" function in these forums
you can use the "code function" by typing the [code][/code] tags manually.

while true do
  randomFunction()
  if amIDoingThisRight==true then
	print("TheCode")
  end
end
Edited on 07 March 2014 - 10:28 AM