ID:148031
 
I really don't understand what's gonig on right now. I really though I could figure this out by I guess I'm not as good a coder as I want to be :/. Anyways here it goes.
mob
Login()
src.name = input("What's your name") as text
src.loc = locate(15,9,1)
src.icon = 'Characters.dmi'
src<<"<font color = RED>[usr] logs in!"
amountofplayer ++
if(amountofplayer == 1||amountofplayer == 5||amountofplayer == 10||amountofplayer == 15)
src<<"<small>You joined as it!"
src.contents += /obj/Catch
src.icon = 'It.dmi'
else usr<<"<small>You're not it!"

This is my Login coding. I don't get any compile errors but I do get a runtime error:

runtime error: cannot append to list
proc name: Login (/mob/Login)
usr: the sdf (/mob)
src: the sdf (/mob)
call stack:
the sdf (/mob): Login()
the sdf (/mob): Login()

All help is appreaciated.
Is your variable "amountofplayer" set as a list? And if so, do you have it created with the New() proc?
In response to HavenMaster
Nope amountofplayer is a global var
var/amountofplayer


In response to SSChicken
Ah. Try this:

var/list/amountofplayer = new()

That should do it.
mob
Login()
src.name = input("What's your name") as text
src.loc = locate(15,9,1)
src.icon = 'Characters.dmi'
src<<"<font color = RED>[usr] logs in!</font>"
amountofplayer += 1
if(amountofplayer == 1||amountofplayer == 5||amountofplayer == 10||amountofplayer == 15)
src<<"<small>You joined as it!"
src.contents += /obj/Catch
src.icon = 'It.dmi'
else usr<<"<small>You're not it!"

var/amountofplayer = 0


That should do it :)
Looks like your trying to add a type path to a list. :)

src.contents += /obj/Catch
In response to Jnco904
He should use
new /obj/Catch(src.contents)

I think that would work =)
In response to Airjoe
That would do it, but I figured he just needed a little push in the right direction instead of the code, and when I try to post code somewhere to help people I almost always have an error. :)