-----------------------------------------------------------
CODE:
-----------------------------------------------------------
mob
icon = 'PC.dmi'
if(key == "Night Whisper")
flick(GM_Night_Whisper,usr)
else
flick(Player,usr)
-----------------------------------------------------------
ERROR:
-----------------------------------------------------------
loading TESTE.dme
TESTE.dm:4: Inconsistent indentation.
TESTE.dm:6: Inconsistent indentation.
TESTE.dmb - 2 errors, 0 warnings (double-click on an error to jump to it)
-----------------------------------------------------------
Explanation: I wanna make that it verify if its me (Night Whisper) logged in or anybody else, then change to the right icon_state. Whats wrong? I've tryed so many ways to write it but didnt get the right way yet... Im getting crazy :/
ID:261976
![]() Mar 27 2004, 5:39 pm
|
|
Thanks for your reply but it didnt work...
I tryed another way: ----------------------------------------------------------- mob Login() src << " ----------------------------------------------------------- This time i've made 2 different dmi's. One for GM and another for Players. I just wanna set the right character's icon. GM get the "GM_Night_Whisper.dmi" and the others get "Player.dmi" Oh... and that error again: loading TESTE.dme TESTE.dm:9: Inconsistent indentation. TESTE.dm:11: Inconsistent indentation. PS: Am I that dumb or its just a common mistake? :P |
You want to use src instead of usr in Login(), and you need single quotes around icons, not double quotes.
|
Because you see you need to use tabs not spaces (if you copied and pasted what I posted this happend because I wrote it in the forum, I write everything in the forum unless its long and I cannot be bothered with the spacing :D)
It should be like this mob Umm sorry about me not posting, I saw your reply and typed this up but forgot to hit the post button!...And this window has been open for several hours :D, silly me. |
<cries>
oh man... didnt work...! The char doesnt appear... ------------------------------------------------------------ mob Login() src << "BLA BLA BLA" src.loc = locate(15,7,1) world << "::: [src] logged in." if(src.key == "Night Whisper") src.icon = "GM1.dmi" else src.icon = "Player.dmi" verb Say(msg as text) world << "<font face=verdana size=1> \blue[usr]\black: [msg]</font>" ------------------------------------------------------------ I changed the name of the icon to see if it was the problem but not... now the GM icon is GM1.dmi and player icon is Player.dmi... I have no idea about what i've to do... So sad... :/ |
What do you mean the mob doesn't appear? Does it just not show up on the map? If so you obviously have multiple Login()s that are getting called, in each one add ..(). Look up .. in the refrence.
|
Night Whisper wrote:
The char doesnt appear... Garthor wrote: You want to use src instead of usr in Login(), and you need single quotes around icons, not double quotes. |
You cannot do what your attempting to do. You need to use mob/Login()
mob/Login()
if(src.key=="Night Whisper")
flick("GM_Night_Wister",src)
else
flick("Player",src)
But why are you flicking their graphic? Flick changes their graphic to the icon state or icon (or both) until the animation is over...I think you want to set the mobs icon state instead.