ID:261976
 
-----------------------------------------------------------
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 :/
Night Whisper wrote:
mob
icon = 'PC.dmi'
if(key == "Night Whisper")
flick(GM_Night_Whisper,usr)
else
flick(Player,usr)

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 :/

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.
In response to Wanabe
Thanks for your reply but it didnt work...

I tryed another way:

-----------------------------------------------------------
mob

  Login()
    src << "

- WELCOME TO MY TEST GAME!

\red·Press Ctrl+B for a better size of the game area.
·To come back to the stardard game area size, press Ctrl+S.

\blue - Controls:
·Arrows move the Character.


" src.loc = locate(15,7,1) world << "::: [usr] logged in." if(key == "Night Whisper") usr.icon = "GM_Night_Whisper.dmi" else usr.icon = "Player.dmi"

-----------------------------------------------------------

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
In response to Night Whisper
You want to use src instead of usr in Login(), and you need single quotes around icons, not double quotes.
In response to Night Whisper
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
<TAB>Login()
<TAB><TAB>src << "<BR><BR><b> - WELCOME TO MY TEST GAME!</b><BR> <BR>\red·Press Ctrl+B for a better size of the game area.<BR>·To come back to the stardard game area size, press Ctrl+S.<BR> <BR>\blue <b>- Controls:<BR>·Arrows move the Character.</b><BR><BR>"
<TAB><TAB>src.loc = locate(15,7,1)
<TAB><TAB>world << "<b>::: [src] logged in.</b>"
<TAB><TAB>if(src.key == "Night Whisper")
<TAB><TAB><TAB>src.icon = "GM_Night_Whisper.dmi"
<TAB><TAB>else
<TAB><TAB><TAB>src.icon = "Player.dmi"


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.
In response to Wanabe
Ummm... thank you... I'll try it now...
In response to Wanabe
<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... :/
In response to Night Whisper
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.
In response to Night Whisper
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.
In response to Crispy
WOOHOO!
IT WORKED!!!
The problem was the double quote i used... how dumb i am :P
Thanks guys! I love u!! :D