Ta©ti Tac0Z 2 Posted January 20, 2017 Share Posted January 20, 2017 hallo weren i try to run one of my programs the screen truns blue and seying: /lib/term.lua:333 attempt to perform arithetic on local '_y' (a nil value) i can see weren i go in at line 333 and yes it do try to make a math as it says. is this like a fail by me or openos? or a 3 fing plese help me the pastebin code is: gpf27zhf use: http://pastebin.com/gpf27zhf Quote Link to post Share on other sites
0 Molinko 43 Posted January 20, 2017 Share Posted January 20, 2017 Post you code. All of it. Then I can help you Quote Link to post Share on other sites
0 TYKUHN2 2 Posted January 21, 2017 Share Posted January 21, 2017 Code appears to be the included term.lua unless it's modified. Quote Link to post Share on other sites
0 Ta©ti Tac0Z 2 Posted January 21, 2017 Author Share Posted January 21, 2017 Monlinko ok then Quote Link to post Share on other sites
0 Ta©ti Tac0Z 2 Posted January 21, 2017 Author Share Posted January 21, 2017 Tykuhn2 yes i know that and no i have not modifiet it at all Quote Link to post Share on other sites
0 Ta©ti Tac0Z 2 Posted January 21, 2017 Author Share Posted January 21, 2017 Ok and just so You know the only API i have uset from term.lua is the term.setCursor() Quote Link to post Share on other sites
0 Ta©ti Tac0Z 2 Posted January 21, 2017 Author Share Posted January 21, 2017 The pastepin code Will be in the post (at the top) in 2 min Quote Link to post Share on other sites
0 Ta©ti Tac0Z 2 Posted January 21, 2017 Author Share Posted January 21, 2017 and if i remove line 52 it will not crasing Quote Link to post Share on other sites
0 Molinko 43 Posted January 21, 2017 Share Posted January 21, 2017 (edited) I would recommend using strictly local variables. Your problem is coming from the fact that the variables _rpx and _rpy are expected to be global but are only initialized in the 'printBack' function. This is a problem for the definition of 'readUrl' above that which expects _rpx and _rpy to be able to do its job. I believe a simple fix would be this.... I think this is your issue... Im afraid i haven't had the chance to test. Good luck I was stupid.. Your problem is on line #52. term.setCursor(rpx, rpy) should be term.setCursor(_rpx, _rpy) -- you named the variables with underscores Hope that helps... :/ Edited January 21, 2017 by Molinko Im dumb Quote Link to post Share on other sites
0 Ta©ti Tac0Z 2 Posted January 21, 2017 Author Share Posted January 21, 2017 So you say that rpx and rpy is writet as a local i don't remeber that And do a _ mean local like is "local rpx" the same as "_rpx" ?? Quote Link to post Share on other sites
0 Molinko 43 Posted January 21, 2017 Share Posted January 21, 2017 I've edited my initial post. Quote Link to post Share on other sites
0 Ta©ti Tac0Z 2 Posted January 28, 2017 Author Share Posted January 28, 2017 Ok then thank you Quote Link to post Share on other sites
hallo weren i try to run one of my programs the screen truns blue and seying:
/lib/term.lua:333 attempt to perform arithetic on local '_y' (a nil value)
i can see weren i go in at line 333 and yes it do try to make a math as it says.
is this like a fail by me or openos?
or a 3 fing plese help me
the pastebin code is: gpf27zhf
use: http://pastebin.com/gpf27zhf
Link to post
Share on other sites