ID:145256
 
Code:
//transform into ssj2
if (usr:transformed == 2&&tInput == "Super Saiya-jin 2")
if(usr:maxPL >= ssj2PL)
usr:underlays += 'bl.dmi'
usr:underlays += 'br.dmi'
usr:underlays (locate(0,1,0))+= 'tl.dmi'
usr:underlays (locate(0,1,0))+= 'tr.dmi'
usr:overlays += /obj/elec
usr:transformed = 3
usr:currPL = round(((150/100) * usr:maxPL), 1)
usr:strength = round(((150/100) * usr:origStrength), 1)
usr:currKI = round(((150/100) * usr:maxKI), 1)
view() << "* <font color=green><strong>[usr]'s</strong> muscles begin to bulge, but becomes sluggish as they become Super Saiya-jin 2</font> *"
else
usr << "You are too weak to be Super Saiya-jin 2"
else if (usr:transformed != 2&&tInput == "Super Saiya-jin 2")
usr << "You must be Ultra Super Saiya-jin"
return


Problem description:The bit where it has usr:underlays (locate(0,1,0))+= 'tl.dmi'
usr:underlays (locate(0,1,0))+= 'tr.dmi'
is not working, when i test it the tr.dmi icon is just still on my guy, i want it to go above him


Ugh no usr in verb/proc and in pretty much everything but click/dblclick also don't use : just a normal fullstop is fine.
In response to A.T.H.K
It still doesn't work..
In response to Strong123488
of course its not going to fix it...
In response to A.T.H.K
Well, how do i fix it?, it's getting annoying..
If it doesn't work, it has errors. They may not be compile-time errors, but they're still errors.

And how in the world does this not have compiler errors? It's rife with syntax gaffes. This shouldn't compile at all.

A few obvious things to fix:

  • locate(0,1,0) is not a real turf; it will always be null.
  • underlays is not a proc, so don't put something in parentheses right after it and expect it to work.
  • Avoid using the : operator at (practically) all costs. When you're working with a var like src or usr that already has the right type, this is a no-brainer. It's usr.underlays, not usr:underlays.

    Lummox JR
In response to Lummox JR
usr.underlays (locate(x,y+1,z))+= 'tl.dmi'
usr.underlays (locate(x,y+1,z))+= 'tr.dmi'<dm/>

is this getting better and could you point out what is wrong with the code?
In response to Strong123488
if (usr:transformed == 2&&tInput == "Super Saiya-jin 2")
if(usr:maxPL >= ssj2PL)
usr.underlays += 'bl.dmi'
usr.underlays += 'br.dmi'
usr.underlays (loc = locate(usr.x,usr.y + 1,usr.z))+= 'tl.dmi'
usr.underlays (loc = locate(usr.x,usr.y + 1,usr.z))+= 'tr.dmi'
usr.overlays += /obj/elec
usr:transformed = 3
usr:currPL = round(((150/100) * usr:maxPL), 1)
usr:strength = round(((150/100) * usr:origStrength), 1)
usr:currKI = round(((150/100) * usr:maxKI), 1)
view() << "* <font color=green><strong>[usr]'s</strong> muscles begin to bulge, but becomes sluggish as they become Super Saiya-jin 2</font> *"
else
usr << "You are too weak to be Super Saiya-jin 2"
else if (usr:transformed != 2&&tInput == "Super Saiya-jin 2")
usr << "You must be Ultra Super Saiya-jin"
return


Is the underlays and stuff for the aura getting better, it still isn't working..
In response to Strong123488
Again, underlays is not a proc. There is no underlays(blah) format that the compiler will recognize. How this is compiling for you at all when it's so very wrong is a mystery.

Lummox JR
In response to Strong123488
Can you just take my coding and try to fix it up, ive been trying this for hours..