Hello everyone, I am trying to make a platformer game and I was watching goature's tutorial videos about making one and I followed his every step, except I've tried to make my own menu too. I keep getting this same error all the time
"attempt to call field 'clamp' ( a nill value )"
what am I doing wrong?
[Solved] Trying to make a simple platformer
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: [Not solved] Trying to make a simple platformer
i guess you use a libray wich use another library that is not present in your game
math.clamp is something provided by a lib that miss but i don't remember the name
let me search a bit
EDIT 1: mmh... camera...
EDIT 2 : it works if you declare a math.clamp function somewhere (in main.lua for example)
so, try to add this :
math.clamp is something provided by a lib that miss but i don't remember the name
let me search a bit
EDIT 1: mmh... camera...
EDIT 2 : it works if you declare a math.clamp function somewhere (in main.lua for example)
so, try to add this :
Code: Select all
function math.clamp(x, min, max)
return x < min and min or (x > max and max or x)
end
Current work : Isömap
-
- Prole
- Posts: 1
- Joined: Fri Mar 08, 2013 5:16 pm
Re: [Solved] Trying to make a simple platformer
I'm having the same problem. I'm using the followinghttp://www.explodingrabbit.com/forum/en ... -03-0.717/ and my code is an exact match to his but I'm getting the same error as OP.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], darkfrei, Google [Bot] and 4 guests