ID:159894
 
Question is there a way to set a number to a type.

Ex: list(/skill/punch = 20)??
With associative lists, yes.
In response to Andre-g1
Well, I tried it and it doesn't work....I used skills[/skill/punch] to try and get the number I set it doesn't work.
In response to Lundex
Make it a string.

list("/skill/punch" = 20)
Perhaps you should describe what you're actually trying to do. Yes, an associative list would work, but maybe it can simply be a variable on the object prototype? etc.

Andre-g1 wrote:
Make it a string.

list("/skill/punch" = 20)

That's not the problem, associative lists keys can be of all/most value types except numbers, so they can be type paths. Therefore he must be doing something wrong; too bad we're not telepathic and can't read minds, so we can't mystically detect the problem in his code. >_>
In response to Kaioken
Kaioken wrote:
too bad we're not telepathic and can't read minds, so we can't mystically detect the problem in his code. >_>

That'd be great. I'd love to have a telepathy ability <_<

Jokes aside, he should indeed show us more of what he's trying to do.
In response to Kaioken
I'm using /skill/punch as the skill path to the player skills, and I'm trying to set a number, which would be the percent of the skill out of 100% which is mastery.