ID:261451
 
It doesn't show the icon on this Login code,and it gives me a runtime error.

Here it is:


mob
Login()
..()
switch(input("What team would you like to be on?","Team") in list("Blue","Red","Grey","Green"))
if("Blue")
Team += src
src.Team = "Blue"
src.icon = 'Player.dmi'
Blue += src
src.loc = locate(8,46,1)
if("Red")
Team += src
src.Team = "Red"
src.icon = 'Player2.dmi'
Red += src
src.loc = locate(65,10,1)
if("Grey")
Team += src
src.Team = "Grey"
Grey += src
src.loc = locate(6,9,1)
if("Green")
Team += src
Team = "Green"
Green += src
src.loc = locate(76,70,1)




Thanks!

--SSJ4_Gohan_Majin



Where's the error?
In response to WizDragon
There is no error.It just gives me a runtime error and the icon doesn't show.

--SSJ4_Gohan_Majin
In response to SSJ4_Gohan_Majin
SSJ4_Gohan_Majin wrote:
There is no error.It just gives me a runtime error

Um...
In response to Skysaw
Skysaw wrote:
SSJ4_Gohan_Majin wrote:
There is no error.It just gives me a runtime error and the icon doesn't show.

Um...

?????????
In response to Skysaw
Skysaw wrote:
SSJ4_Gohan_Majin wrote:
There is no error.It just gives me a runtime error

Um...

Indeed. In my own words. "Sigh".
In response to SSJ4_Gohan_Majin
SSJ4_Gohan_Majin wrote:
Skysaw wrote:
SSJ4_Gohan_Majin wrote:
There is no error.It just gives me a runtime error

Um...

?????????

My thought exactly!

Is there or is there not an error??
In response to Skysaw
0 errors,0 warnings.But the icon doesn't show and it gives me a runtime error when i Login.
In response to SSJ4_Gohan_Majin
SSJ4_Gohan_Majin wrote:
0 errors,0 warnings.But the icon doesn't show and it gives me a runtime error when i Login.


No errors? Are you sure?
In response to Nadrew
Nadrew wrote:
SSJ4_Gohan_Majin wrote:
0 errors,0 warnings.But the icon doesn't show and it gives me a runtime error when i Login.


No errors? Are you sure?

Oh,uhhhh I didn't see that....1 error,0 warnings.
In response to SSJ4_Gohan_Majin
SSJ4_Gohan_Majin wrote:
0 errors,0 warnings.But the icon doesn't show and it gives me a runtime error when i Login.

A runtime error is an error.
A compile error is also an error.
A logic error (the wrong thing happening) is also an error.

When you say there's no error, you're effectively saying there's nothing wrong. Be more specific (and please also apply common sense). If you have an error message, show it to us.

Lummox JR
In response to SSJ4_Gohan_Majin
SSJ4_Gohan_Majin wrote:
0 errors,0 warnings.But the icon doesn't show and it gives me a runtime error when i Login.

Ok, pay attention. I'm going to ask this as simply as I can:

What is the error message at runtime?
In response to Skysaw
Skysaw wrote:
SSJ4_Gohan_Majin wrote:
0 errors,0 warnings.But the icon doesn't show and it gives me a runtime error when i Login.

Ok, pay attention. I'm going to ask this as simply as I can:

What is the error message at runtime?



runtime error: type mismatch
proc name: Login (/mob/Login)
usr: SSJ4_Gohan_Majin (/mob)
src: SSJ4_Gohan_Majin (/mob)
call stack:
SSJ4_Gohan_Majin (/mob): Login()


--SSJ4_Gohan_Majin
In response to SSJ4_Gohan_Majin
SSJ4_Gohan_Majin wrote:
runtime error: type mismatch
proc name: Login (/mob/Login)
usr: SSJ4_Gohan_Majin (/mob)
src: SSJ4_Gohan_Majin (/mob)
call stack:
SSJ4_Gohan_Majin (/mob): Login()

In every different color-choice block, you've got a line that says Team+=src. In the following line you say src.Team=color. Unless you've got a local var named Team, the first line also refers to src.Team.

That being the case, src.Team is probably starting out as null, so what you're saying is this:
Team = null + src

Type mismatch error. The solution is to delete the Team+=src line. Ideally the whole piece of code could use a lot of cleaning up, but that's something you'll probably discover later.

Lummox JR