"Komag" wrote:
Wait a second, does that say you have over 2800 functions?!?! :shock: :shock:
I thought I had a lot with a little over 100!
Thanks for the tests and info. TheEndless, what is the stats command? When I type "help" and see the different commands, nothing looks like stats. I tried "bscs" (which tells me I have almost 14,000 roArray components among other things!), and I tried other things.
function main() as Void
data = loadDataList()
applyTransformation(data, function(a) as Void
if type(a.date) <> invalid
a.date = dateCreateWithString(a.date)
end if
end function)
end function
"Komag" wrote:
Is this confirmed in anyone's experience, that it's per function, and that it's 255?
"Rek" wrote:
The limit appears to be 253 on my Roku 2. The following snippet works fine, until adding one more variable ("x253 = 253") ...
"Komag" wrote:
TheEndless, what is the stats command? When I type "help" and see the different commands, nothing looks like stats.
"Rek" wrote:
FUNCTION getSounds() ' trig by Main(1) near top
hitMon = CreateObject("roAudioResource", "pkg:/sounds/hitMon.wav")
missMon = CreateObject("roAudioResource", "pkg:/sounds/missMon.wav")
hitPlayer = CreateObject("roAudioResource", "pkg:/sounds/hitPlayer.wav")
missPlayer = CreateObject("roAudioResource", "pkg:/sounds/missPlayer.wav")
deathMon = CreateObject("roAudioResource", "pkg:/sounds/deathMon.wav")
sounds = {hitMon: hitMon, missMon: missMon, hitPlayer: hitPlayer, missPlayer: missPlayer, deathMon: deathMon} ' I don't think this is best way to do it
RETURN sounds
END FUNCTION
That way Main() is only adding one more variable, an AA with all the sounds.
(Would this be the right approach?)
function loadSounds():
sounds = { }
for each name in ["hitMon", "missMon", "hitPlayer", "missPlayer", "deathMon"]:
sounds[name] = CreateObject("roAudioResource", "pkg:/sounds/" + name + ".wav")
end for
return sounds
end function
"TheEndless" wrote:
Wow.. it looks like they got rid of the stats command in a recent firmware update. It used to list a count of all variable types and their limits, including functions. Wonder why they ditched it... :?:
"Catch-22" wrote:
"Why not?" was Chief White Halfoat's answer.
"squirreltown" wrote:
you don't even have to wrap it in Sub Main()/End sub
"EnTerr" wrote:
And with small modification, shortage of variables averted:
function loadSounds():
sounds = { }
for each name in ["hitMon", "missMon", "hitPlayer", "missPlayer", "deathMon"]:
sounds[name] = CreateObject("roAudioResource", "pkg:/sounds/" + name + ".wav")
end for
return sounds
end function
"EnTerr" wrote:"TheEndless" wrote:
Wow.. it looks like they got rid of the stats command in a recent firmware update. It used to list a count of all variable types and their limits, including functions. Wonder why they ditched it... :?:"Catch-22" wrote:
"Why not?" was Chief White Halfoat's answer.