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

[1.6.4] button:33: attempt to perform arithmetic on string?

Started by RECKLESS_kiwi, 18 March 2014 - 11:45 AM
RECKLESS_kiwi #1
Posted 18 March 2014 - 12:45 PM
My Code: http://pastebin.com/0agKNCmF
Version: FTB Monster
Trying to Make: Something Like Direwolf's essentia refill system
Problem: I get the error message button:33: attempt to perform arithmetic on string

I have looked over the code multiple times and honestly have no idea what is wrong. I am using Dire's button api I did nothing to it and I get this error message. So if you can help that would be awesome. Thanks
CometWolf #2
Posted 18 March 2014 - 03:14 PM
You linked the button api, not your actual code, so i can only guess what you actually passed to the setTable function.

function setTable(name, func, xmin, xmax, ymin, ymax)
If xmax or xmin is a string, you will indeed get that error.
RECKLESS_kiwi #3
Posted 18 March 2014 - 03:52 PM
You linked the button api, not your actual code, so i can only guess what you actually passed to the setTable function.

function setTable(name, func, xmin, xmax, ymin, ymax)
If xmax or xmin is a string, you will indeed get that error.
So how can I fix it?
TheOddByte #4
Posted 18 March 2014 - 04:54 PM
So how can I fix it?
Post the code your using the API for
RECKLESS_kiwi #5
Posted 18 March 2014 - 05:38 PM
So how can I fix it?
Post the code your using the API for
http://pastebin.com/RnYXQ8WQ
Lyqyd #6
Posted 18 March 2014 - 05:53 PM
You have an extra argument between func and xMin on all of your button adding calls. Get rid of that third argument and it should go away. Why are you putting anything there anyway?
Termanater13 #7
Posted 18 March 2014 - 06:33 PM
the code supplied looks like direwolf's essentia refill system. he has not posted an updated button API that works with the refill stsyem, but it shoulde easy to add it in.
Edited on 18 March 2014 - 05:33 PM
RECKLESS_kiwi #8
Posted 18 March 2014 - 07:18 PM
You have an extra argument between func and xMin on all of your button adding calls. Get rid of that third argument and it should go away. Why are you putting anything there anyway?
I really have no idea what that means sorry, I just downloaded his code and try to make it work and I got this error message and could not figure out how to fix it

You have an extra argument between func and xMin on all of your button adding calls. Get rid of that third argument and it should go away. Why are you putting anything there anyway?
Sorry to be hard, but could you tell me where and what I need to delete. Thanks