Okay. I'm making a program here. It uses the modem api to send messages.
Currently, I'm implementing a command that allows users to change their channel.
But, I get the error "Expected number" on line 108. I can't for my life figure out why.
Thanks for help.
- Mackan
Code
Expected number?
Started by Mackan90096, May 13 2015 03:09 PM
2 replies to this topic
#1
Posted 13 May 2015 - 03:09 PM
#2
Posted 13 May 2015 - 03:58 PM
Line 47:
If args[ 1 ] was not a number, channel is now nil, resulting in you passing nil, nil to modem.transmit on line 108.
Suggested Fix: Change line 47
channel = tonumber(args[1])
If args[ 1 ] was not a number, channel is now nil, resulting in you passing nil, nil to modem.transmit on line 108.
Suggested Fix: Change line 47
channel = tonumber(args[1]) or channel
Edited by KingofGamesYami, 13 May 2015 - 04:04 PM.
#3
Posted 14 May 2015 - 11:03 AM
Ah, that fixed it! Thanks!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











