|
Post by rajikhushi70 on Jul 24, 2018 7:01:16 GMT
I made scrip to display different text on Infobox but not working.. please guide for the same.. Below is script.... currents = {} currents['msg'] = { searching_map = 0, altar_found = 0, camp_found = 0, no_troops = 0, no_food = 0, attack_fail = 0, dragon = 0 } function stats_info() info = os.date("%H:%M").. " --> " .. 'Current Mode: ' .. currents['mode'] .. ' ' .. currents['msg'] .. '\n' .. 'Altar Farmed: ' .. tostring(currents['hits']['wood'] .. ' Camp Farmed: ' .. tostring(currents['hits']['npcs'])) return info end Function doAltar() .... .... currents['msg'] = "altar_found " end while true do infoBox:highlightOff() infoBox:highlight(stats_info()) end will this display msg on infobox? ??
|
|
|
Post by AnkuLua on Jul 24, 2018 7:04:49 GMT
Try to add wait() after highlight(). The script turn the highlight off too soon.
while true do infoBox:highlightOff()
infoBox:highlight(stats_info()) wait(5) end
|
|
|
Post by rajikhushi70 on Jul 24, 2018 7:58:05 GMT
attempt to calll concatenate field 'msg' (a table value)
getting above error
|
|
|
Post by Exilereven on Jul 24, 2018 12:01:22 GMT
An example of my own code. function shutdown(msg) dialogInit() if msg then -- addTextView("") newRow() -- addTextView("\t" .. msg) newRow() -- addTextView("") newRow() addSeparator() addTextView("") newRow() -- end -- addTextView("\tSomething goes wrong, please check if:") newRow() -- addTextView("\t - Your internet connection is stable") newRow() -- addTextView("\t - NETWORK FUNCTION on ankulua setting is checked") newRow() -- addTextView("\t - Game is installed") newRow() -- addTextView("\t - If the error persists please report at www.facebook.com/DragoBot.android/") newRow() -- addTextView("") newRow() -- dialogShowFullScreen("[Error]") scriptExit() end
|
|
|
Post by rajikhushi70 on Jul 24, 2018 12:20:42 GMT
This is for dialog...,need info for the infobox...
|
|
|
Post by rajikhushi70 on Jul 24, 2018 12:44:51 GMT
I am asking simple thing please understand my little question
If I write like...
If exists (altar) then
Toast("found altar")
....
toast will print text "found altar" on screen...
Same I want to print on infobox.. That's all
Means all toast text I want to highlights on infobox through infobox function
|
|
|
Post by AnkuLua on Jul 24, 2018 13:08:02 GMT
Your question is not clear.
if exists(altar) then infobox:highlight("found altar", 2) ...
Is this what you want? (Can feel that it isn't.)
|
|
|
Post by Exilereven on Jul 24, 2018 17:05:28 GMT
function stats_info(infomsg)
infomsg = os.date("%H:%M").. " --> " .. 'Current Mode: ' .. currents['mode'] .. ' ' .. currents['msg'] .. '\n'
.. 'Altar Farmed: ' .. tostring(currents['hits']['wood'] .. ' Camp Farmed: ' .. tostring(currents['hits']['npcs']))
return infomsg
end
Function doAltar()
.... .... currents['msg'] = "altar_found "
end
while true do
infoBox:highlightOff()
--your stats_info () is a function --you need to create a variable for it to use like: function stats_info(infomsg)
infoBox:highlight(infomsg) end
This is just a guess from my phone while at work lol. But I think it's not setup correctlt, as well as I'm not 100% on how to use infobox correctly. Maybe get you on right path?
|
|
|
Post by rajikhushi70 on Jul 25, 2018 2:22:18 GMT
Thanks both.. This is what I wanted.. Hope it will work.. Thanks again
|
|