Fly()
set category = "Admin"
if(!fly){density=0;usr<<"You begin to fly.";fly++}
else {density=1;usr<<"You land on the ground.";fly--}
mob/var/fly
the icons i am using are
mob.dmi
&
testmob.dmi
ID:167397
Mar 18 2006, 4:19 pm
|
|
here is the code
Fly() the icons i am using are mob.dmi & testmob.dmi |
Mar 18 2006, 4:26 pm
|
|
The topic is called "How would i change this icon.........................." but there is no icon to change
|
In response to A.T.H.K
|
|
yes i did i gave my icon its the mob one and i need to change it to testmob
|
In response to Mxjerrett
|
|
He means that there isn't an icon defined in the code snippet given.
|
In response to Pyro_dragons
|
|
well i cant really do much there accept show you my icon code.
mob |
mob/verb/Fly() Is this what you wanted to do? It should work but I haven't tested it. |
In response to Kireis
|
|
its kinda choppy but i altered the code to this
Fly() |
In response to Mxjerrett
|
|
I don't mean to try to tell you how you should code your own work but it appears to me that you are just getting familiar with the DM language. I'd reccomend that you start out with formatting your code the way I showed you. You should put the proc definitions on seperate lines instead of using semicolons and keeping them on the same line. It's easier on the eyes and allows beginners to grasp the concept of what belongs inside what. It just seems like a more organized way to code to me. Also I recommend that you define the variables originalicon and fly inside the proc instead of at a global scope. That is, unless you use those variables outside of the proc, but i doubt it.
|
In response to Kireis
|
|
MxJerret, REALLY now, stop copy/pasting off forums, stop the user abuse, and read the DM guide. This has gone outrageous!
What was the previous guy's name? Vegeto or something? Vejito? o.o |
In response to Mysame
|
|
Mysame wrote:
What was the previous guy's name? Vegeto or something? Vejito? o.o Do you mean Govegtos? =/ O-matic |
In response to O-matic
|
|
YES! That's the one! Govegtos!
|
In response to Mxjerrett
|
|
Mxjerrett wrote:
well i cant really do much there accept show you my icon code. > mob Firstly, you need to call the parent in mob/Login(). Else Login() will never finish properly. Also, using usr in a Login() proc is a big no-no. You might find reading the UsrLecture usefull. And can you give a better explanation of what you're wanting to do? I don't understand a thing... O-matic |
Mxjerrett wrote:
here is the code > Fly() the icons i am using are It'd be nice if you gave me a credit for my code next time... Don't copy from examples, learn from them. Bah. As for changing icons, just add ;icon='icon.dmi' or somthing. |
In response to Kireis
|
|
um i tried to do it this way
Fly() but i get this error can someone help fix it loading The Last Hero.dme code files\admin.dm:50:error::invalid expression code files\admin.dm:51:error:else :'else' clause without preceding 'if' statement code files\admin.dm:52:error::missing expression The Last Hero.dmb - 3 errors, 0 warnings (double-click on an error to jump to it) |
In response to Mxjerrett
|
|
Well it might be because you have to put the code in the {}
Fly() Please don't copy and paste your not learning much i only did it to show you what you have to do and PLEASE PRETTY PLEASE stop taking credity for everything that isn't yours andi doubt you have much of the game your working on its all snippets off the forums READ THE DM guide and REFERENCE please pretty god damn please |
mob/admin/verb/Fly() |