ID:148296
 
In my game I am working on the cards show up in the persons stat panel. I am gettin this runtime error tho every time I go in to statpanel.


runtime error: Cannot execute null.Find().
proc name: Stat (/mob/Stat)
usr: Rollerc (/mob)
src: Rollerc (/mob)
call stack:
Rollerc (/mob): Stat()
runtime error: undefined proc or verb /obj/Cards/FootSoilder/Find().


Heres the code.

mob/Stat()
statpanel("Stats")

if(usr.Ingame==1)
if(GameStarted==1)
statpanel("Cards")
if(client.statpanel=="Cards")
stat("CPU:",world.cpu)
if(indeck.Find(/obj/Cards/King))
var/obj/Card/A=new()
A.name="King"
A.icon_state="Card_1"
A.Type=""

for (var/obj/O in usr)

if(O.name == "King")

stat(A)





Your problem is obvious: infile is null.
mob/var/list/incards
mob/var/list/indeck
mob/var/list/InPlay


That doesnt look like its set to null =\
In response to Rollerc
It isn't initialized, so it's null.
In response to Garthor
What should it be then...