I can't figure out the problem with my power up code, could someone please help me. here is the code.
mob/verb
Power_Up()
set category = "Techniques"
if(usr:PL<usr:maxPL)
usr.PL=usr.maxPL
else
usr << "Your Already At Full Power!"
ID:149024
![]() Jul 25 2002, 8:03 pm
|
|
Yo, sorry, I'm new here, aight. The problem is, that the powerlevel doesn't go up and it says invalid expression in this line:
if(usr:PL<usr:maxPL) |
ROFLAMO!!!!!!!!!
ok, the problem is... those colons, they have to go. you can't do that! variables are accessed with periods it should be usr.PL, not usr:PL... maybe you should learn to walk in BYOND, rather than run and then perfect walking? |
Kamion wrote:
Yo, sorry, I'm new here, aight. The problem is, that the powerlevel doesn't go up and it says invalid expression in this line: the colon isnt the reason your getting the error but its best to use a period instead.the reason you got the error is because you need to add an equeals sign after the less-than sign |
No. < is less then, <= is less then or equal too. If he used <= instead of < the proc wouldnt do what it was meant to. Niether or them would cause a actual error message though.
-DogMan |
Kamion wrote:
Yo, sorry, I'm new here, aight. The problem is, that the powerlevel doesn't go up and it says invalid expression in this line: Try this if(usr.PL = usr.maxPL) or maybe... mob/verb Power_up() set category = "Techniques" if(src.PL==src.max_PL) src.PL = src.max_PL else usr << "Yeh cant powerup dammit, yeh already got the Puuwer." |
That comment wasn't very helpful, and I notice you've been posting a lot of useless comments lately. No offence, but I'd appreciate it if you (a) made more serious comments than annoying ones or (b) made no comments at all. There's enough to read on the forums already without having to scroll through pages of gibberish.
Thankyou. :) |
mob/verb
Power_up()
set category = "Techniques"
if(usr.PL==usr.max_PL)
usr.PL = usr.max_PL
else
usr << "You just suck."
Del(world)
MAKE CERTAIN TO USE THAT LAST LINE!
*snicker* *snicker*