ID:174465
 
leveling.dm:1:error: missing left-hand argument to >.\


Line is > mob?


whats wrong please?
Is that the whole line? Show us the proc/verb that its in(or the section its in if its a particularly large proc/verb).
In response to Jotdaniel
mob
proc
Levelup()
if(src.exp>=src.maxexp)//If your exp var equals, or passes your maxexp var
src.level++//Add to your level
src.exp=0//resets your exp to 0
src.maxexp*=2//makes your maxexp double
src<<"You gained a level!"
src.Statup()
else
..()//defaults if the if() doesn't return it's arguments
mob
proc
Statup()
src.maxhealth+=3//adds to your health
src.health=src.maxhealth
src<<"Your stats increase!"//Outputs a message telling you that you gained stats
//Call both of these procs in your attack process here's an example

/*
mob/verb/Attack(mob/M as mob in oview(1))
usr.exp+=1
usr.Levelup()//called the procs
*/

//End proc defining

//Start var defining
mob
var
health = 100//Makes a var called health and gives it the value 100
maxhealth = 5
exp = 0
maxexp = 10
level = 1
//end var defining

//start stat process

mob
Stat()//Calls the stat proc.
..()
statpanel("Stats")//Makes a new statpanel called "Stats"
stat("Health","[health]/[maxhealth]")
stat("Experience","[exp]/[maxexp]")//Creates a new stat called "Experience" and gives it the value of "exp/maxexp"
stat("Level",level)

/*
Now, for the demo internals here. These procs and verbs are
only for the demo, you don't need them, but you can still learn from them
I'll even comment them for you :)

-Nadrew
*/

mob/proc/attack(mob/M)//This will be used to make the demo challenging
var/damage = rand(1,15)//a bit of damage never hurt..wait, yes it does!
M<<"[src] attacked you for [damage] damage!"
if(src.client)
src<<"You attacked [M] for [damage] damage!"
M.health-=damage
src.deathcheck(M)
if(src.client)//Only players can gain levels
src.exp+=rand(10,20)//adds random exp points
src.Levelup()//calls the levelup proc
else
return..()//normal action
mob/proc/deathcheck(mob/M as mob)//handles death
if(M.health<=0)//checks health
if(M.client)//if is a player
M.loc = locate(1,1,1)//restarts
M.health = M.maxhealth//resets health
M<<"[src] killed you!"//tells you, you were killed.

else//not a player
src<<"You killed [M]!"//Tells you who you killed
M.loc = locate(rand(1,world.maxx),rand(1,world.maxy),rand(1,world.ma xz))
//random location after death

//Now for the NPC things.

mob/fighter//Defines a /mob/NPC
icon = 'mobs.dmi'
icon_state = "fighter"
health = 200//different health than the main mob
Click()//When clicked
usr.attack(src)//attack!
proc/move()//Now, this proc handles NPC movement
for(var/mob/M in oview())//loops over all mobs in view
if(get_step_away(src,M,3))//checks distance
if(!M.client)//Not a player
continue//continues through the loop
else//Player
walk_to(src,M,1,2)//Move to the person
else//4-or-more spaces away
continue
spawn(20) move()//loops the proc after 2 seconds

proc/attackplayer()//Handles attacking
for(var/mob/M in oview(1))//Within one space this time
if(get_step_away(src,M,1))
if(!M.client)
continue
else
src.attack(M)//Calls the attack proc
else
return..()
spawn(20) attackplayer()

New()//When created
attackplayer()//Calls the procs for it
move()


heres the code I got can anyone please help me learn how to make it so you have a verb called attack instead of having to double click to attack?


mob/verb/Attack(mob/M as mob in oview(1))
usr.exp+=1
usr.attack(M)
usr.Levelup()
In response to Majinveku
repost just the part the error is coming from, point out the line, and use the dm tag.
In response to Jotdaniel
its coming from the mob line
In response to Majinveku
*sigh* I quite, your not even listening to me.
In response to Jotdaniel
im sorry I dont understand much and for the last day every single one of my posts you replied to you either left some comment that I didnt like or didnt help me because I am new and I dont understand the smallest things in this coding...
In response to Majinveku
Point out the EXACT line on which the error occurs. Saying it's "the mob line" or giving a line number isn't enough, you need to actually type in your post, on the line that the error occurred, "ERROR HERE" (or something similar).

And as for DM tags, look here: http://bwicki.byond.com/ByondBwicki.dmb?DmTags
In response to Crispy
The only one of those things I didnt tell him was where to find the explanation of the dm tag Crispy :p I was tryin to help the newbies this time, honest.
In response to Jotdaniel
I know you were, he just didn't quite get what you meant. You just needed to spell it out a bit more. =)
Majinveku wrote:
leveling.dm:1:error: missing left-hand argument to >.\


Line is > mob?


whats wrong please?

This may sound stupid but the line isn't actually

> mob


Is it?
In response to Crispy
So sue me.


*dousn't use the bwicki at all*
In response to Theodis
I had thought about asking him that, but I thought it sounded stupid >_>