Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Error function has more than 60 upvalues
Started by Blickon Feb 12 2012 05:57 AM

- - - - -
5 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Blickon

[GLOBAL: userInfoPane.html]
Blickon
  • Contributor

  • 269 posts
  • Guests

Hi
Why this issue appear?
Cant use more than 60 variables per function?

the error
"function at line 353 has more than 60 upvalues"
uid: 26056 topic_id: 21785 reply_id: 321785


[TOPIC: post.html]
#2

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

Hey, @Blickon, take a look at this post. This should help.

http://developer.anscamobile.com/forum/2011/12/10/runtime-error-function-has-more-60-upvalues

Naomi
uid: 67217 topic_id: 21785 reply_id: 86504


[TOPIC: post.html]
#3

Blickon

[GLOBAL: userInfoPane.html]
Blickon
  • Contributor

  • 269 posts
  • Guests

Thanks for the help Naomi. it is what i was thinking, i declare all the variables of objects on the top, and then separe the all code of gameplay on some different function, and then run this functions and it works great and resolve the problem :)
uid: 26056 topic_id: 21785 reply_id: 86506


[TOPIC: post.html]
#4

JayantV

[GLOBAL: userInfoPane.html]
JayantV
  • Corona Geek

  • 1,740 posts
  • Corona SDK

generally there would be a missing end and a couple of functions in between.
uid: 3826 topic_id: 21785 reply_id: 86507


[TOPIC: post.html]
#5

Blickon

[GLOBAL: userInfoPane.html]
Blickon
  • Contributor

  • 269 posts
  • Guests

yeh, maybe one of the best solution is:

function new()

--variables

Function1()
---Code with functions etc inside
end

Function2()
---Code with functions etc inside
end
.
.
.

--Final Function
Final Function()
    Function1()
    Function2()
end

--and then run the Final function 
Final Function()

end

:)
uid: 26056 topic_id: 21785 reply_id: 86513


[TOPIC: post.html]
#6

Cell Game Labs

[GLOBAL: userInfoPane.html]
Cell Game Labs
  • Enthusiast

  • 91 posts
  • Corona SDK

I know this topic is cold and old but I will revive just so people will see if searching. I see this question asked a lot and it can be frustrating but very simple to fix.

I would like to second this answer.

Before going off and re-arraging your variables, try adding/removing an extra 'end' to the end of the function and see if that works. If so, then work your way from the top down until you find where you missed putting one in the first place.

C
uid: 26289 topic_id: 21785 reply_id: 106982



[topic_controls]
[/topic_controls]