ID:143649
 
Code:
mob
Stat()
..()
statpanel("Levels and experince!",contents)
stat("Star_Points",src starpoints)
stat("Flower_Points",scr flowerpoints)
stat("Health",scr Health)
stat("Badge_Points",scr BP)


var/starpoints
starpoints = 0

var/health
health = 10

var/flowerpoints
flowerpoints = 5

var/BP
BP = 3


Problem description:
Verbs.dm:11:error: starpoints: missing comma ',' or right-paren ')'
Verbs.dm:11:error: starpoints: expected end of statement
Verbs.dm:11:error: ): expected }
Verbs.dm:9:error: location of top-most unmatched {


What is wrong? Plz help!

thanks!

-JF

Look up how to define variables in the DM Guide (Chapter 5), since you seem to be misunderstood on how to define them.

Other than your variable definition errors (which you also want to define to the mob, and not as a global variable), you are not using "src" correctly. When you want to access src's variables, you just use the '.' operator. Therefore src.x would return the value of src's x position.
In response to Unknown Person
Unknown Person wrote:
Look up how to define variables in the DM Guide (Chapter 5), since you seem to be misunderstood on how to define them.

Other than your variable definition errors (which you also want to define to the mob, and not as a global variable), you are not using "src" correctly. When you want to access src's variables, you just use the '.' operator. Therefore src.x would return the value of src's x position.

....What?lol
In response to Jazzyfizzle
Ok Idk what to do... But I guess I will re-look the DM Guide but plz still try to help me ppls :(
I will edit if I find anything out..
Jazzyfizzle wrote:
Code:
> mob
> Stat()
> ..()
> statpanel("Levels and experince!",contents)
> stat("Star_Points",src starpoints)
> stat("Flower_Points",scr flowerpoints)
> stat("Health",scr Health)
> stat("Badge_Points",scr BP)
>
>
> var/starpoints
> starpoints = 0
>
> var/health
> health = 10
>
> var/flowerpoints
> flowerpoints = 5
>
> var/BP
> BP = 3
>
>


mob
Stat()
..()
statpanel("Levels and experince!",contents)
stat("Star_Points",src.starpoints)
stat("Flower_Points",src.flowerpoints)
stat("Health",src.Health)
stat("Badge_Points",src.BP)



mob
var
starpoints=0
Health=10
flowerpoints=5
BP=3


1.There is no need to define each variable individually, it's a waste of space.
2.These variables apply to mob's and as such they should be indented below mob.
3.You don't need to define a variable and then redefine the number.
4.You spelled src wrong alot.
5.when it is the possesion of src, it needs a . before the thing it is possesing.
In response to Z-warrior-Z
You also need to have a [] when you're using a stat panel. It should look like this.

stat("Star points : [src.starpoints]")
In response to Yodamaster
Wrong, the way z-warrior-z did it works fine.