ID:264958
 
Code:
mob
verb
Create_Custom_Character(I as text,Ic as icon)
if(!I||!Ic) return
var/obj/C=new
C.icon=Ic
C.name=I
AllCharacters+= C

ChangeCharacter()
var/obj/I=input("Choose Character")as null| anything in AllCharacters
if(!I) return
src.Character=new I.type
src.icon=I.icon
src<<I.type
src<<I.icon

// my character code
obj
Characters
var//variable
Aura="Blue"//their Aura Colour
Race="Unknown"//their race
NewChar
icon=null
name="NewChar"
//my Change Char code


Problem description:I am trying to code custom character verb where players will be able to create their own characters but when i try to choose player it wont work the icon stays null

Could it be an issue with the icon_state var?
first i would advice making an icon state input as well and make sure that your AllCharacters are defined as a list ie var/AllCharacters = list()
when i tried yours it did not work while i used a normal varible for allcharacters but after that it worked
In response to AbdulH
i got a list which is
var/list/AllCharacters=typesof(/obj/Character)-/obj/Characters

and i fill it with
mob/proc/PoupulateChars()
for(var/v in AllCharacters)
AllCharacters-=v
AllCharacters+=new v