ID:139173
 
Code:
mob
Stat()
statpanel("Stats")
if(statpanel("Stats"))
stat("Name: [src]")
stat("Strength: [Strength]%")
verb
Punch()
icon_state = "Punch"
flick(pick("Punch","Punch1","Punch2"),usr)
M.Strength += 1%
if m.strength = 100%
M << "<font color = blue>Your strength has leveled up!</font>"


Problem description:
I bet this shows im a a beginner, but i am. Anyways im trying to make it that if you punch i gain some str %, not necessarily 1% but i want it that at the beginning, if you have low str that it will go up really fast but as your str goes more and more up it should become harder and harder. So in order to get 1 str level they should have 100%

loading Project.dme
Hub.dm:20:error: missing expression
Hub.dm:21:error: missing expression

Project.dmb - 2 errors, 0 warnings (double-click on an error to jump to it)




Where to start...

First of all, M isn't defined as anything. The executor of a verb is always the usr, so you're going to want to replace the M with usr in your Punch() verb.

Second of all, the syntax for if statements is if(expr). expr must be in parenthesis (). Also, the % character has a special function in programming, and serves to calculate modulus. If you're attempting to determine the percentage of a variable against a maximum value you'll need to do so manually. The formula is: value/maximum*100. You also need to indent what follows the if() statement.

Verbs aren't objects, and therefore don't have variables such as icon and icon_state. If you want the verb to have an appearance, you'll need to create a tangible object, then redefine your logic under Click().

There's a lot more wrong with it, but we'll talk about what I've touched on so far before we move on to the rest.
In response to F0lak
Im lost ._.
In response to SillyChild123
You have a lot of problems with what you're doing right now, I'm trying to help you. What don't you understand? The more you ask, the more I can answer.