ID:141680
 
Code:Chidori String
mob/Jutsu/verb/Chidori()
set category="Ninjutsu"
set name="Chidori"
if(usr.chakra>=usr.chidoridamage)
usr.chakra-=usr.chidoridamage
usr.overlays+='chidori.dmi'
view(4)<<"[usr.name]: Chidori!"
else
usr<<"Not enough chakra. ([usr.chidoridamage] needed)"

mob/verb/ChidoriPower()
set hidden = 1
var/chakrain = input("How much chakra do you want to put into your Chidori?") as num
usr.chidoridamage = "[chakrain]"


Code:Run Time
runtime error: type mismatch: cannot compare 20109 to "2000"
proc name: Chidori (/mob/Jutsu/verb/Chidori)
source file: Jutsu.dm,11267
usr: Name (/mob)
src: Name (/mob)
call stack:
Name (/mob): Chidori()



Code:Line 11267
    if(usr.chakra>=usr.chidoridamage)



Problem description:

Ok, well I was kinda branching out and trying a new way of creating some things, something that has a bit of player input to it. Anyways, to cut to the chase, if someone could help me find a way to make this work, that would be like, super x.x;

I'm not sure which it is (presumably chidoridamage), but one of them is text and the other is a number. You probably want to do text2num(usr.chidoridamage).
In response to Stephen001
Ok...I figured because it does take it as a Number when the person typed it in, it would stay as a Number...ok I'll try and get back to you, Thank you
In response to Stephen001
Many thanks friend, :D
It works 100% so Thanks ^^
In response to Matt3151
No problem.
Matt3151 wrote:
mob/verb/ChidoriPower()
set hidden = 1
var/chakrain = input("How much chakra do you want to put into your Chidori?") as num
usr.chidoridamage = "[chakrain]"
</dm>


To elaborate a little on what Stephen said the reason you're running into this issue is because you're setting chidoridamage to a string instead of a number. Changing
usr.chidoridamage = "[chakrain]"
to
usr.chidoridamage = chakrain
will also fix your problem. Enclosing it in double-quotes sets it to a string, even though you use 'as num' for the input.