Posted 03 August 2012 - 06:17 PM
So here's my genius plan…
i want 20 wireless turtles to move a certain distance at the same time from receiving a distance via a computer's red net.broadcast(). I'm making the broadcast a single number (let's use 10 for this example). The turtles are supposed to read the number broadcasted via an event, id, text =os.pullEvent script that only designates the text.
the problem is…
i have no clue how to convert the 10 from string to a number the turtles can read and act upon… I'm trying to use i=1,Num with local num=text, but i don't know how to format it.
[EDIT] It either returns as a num expected string given error or something similar to that.
Simple solution I'm missing, or is this a lot more complicated than i was hoping?
:P/>/>
[EDIT 2]
Here are the screenshots after I tried to use tonumber()
[attachment=363:Script 1.jpg]
[attachment=364:Script 2.jpg]
[EDIT 3]
Here is the broadcast program
i want 20 wireless turtles to move a certain distance at the same time from receiving a distance via a computer's red net.broadcast(). I'm making the broadcast a single number (let's use 10 for this example). The turtles are supposed to read the number broadcasted via an event, id, text =os.pullEvent script that only designates the text.
the problem is…
i have no clue how to convert the 10 from string to a number the turtles can read and act upon… I'm trying to use i=1,Num with local num=text, but i don't know how to format it.
[EDIT] It either returns as a num expected string given error or something similar to that.
Simple solution I'm missing, or is this a lot more complicated than i was hoping?
:P/>/>
[EDIT 2]
Here are the screenshots after I tried to use tonumber()
[attachment=363:Script 1.jpg]
[attachment=364:Script 2.jpg]
[EDIT 3]
Here is the broadcast program