This topic was marked solved by its starter, on July 18th, 09:56 AM

Nihongo^

  • Full Member
  • Posts: 213
arith op + between "null" and "integer"
«  »Last edited
Why i keep getting this error when i join server its giving me the same error OnPlayerKill function when i headshot

Code: [Select]
status[ killer.ID ].Headshots++;


Athanatos

  • Hero Member
  • Throwing random words to increase my post counter
  • Posts: 1,029
Developer of RCNR, Zombie Survival, VLSM(C++) and Infected City Survival

Nihongo^

  • Full Member
  • Posts: 213
Re: arith op + between "null" and "integer"
« Reply #2,  »
Quote from Athanatos on July 15th, 02:02 AM
status[ killer.ID ] is null. Initialize it when joining inside the onPlayerJoin() function.
Can you give any example how ?
Because
status[ killer.ID ].Kills++;  work perfectly

but when i put
status[ killer.ID ].Headshots++; Its give error same with the Joins++;

Athanatos

  • Hero Member
  • Throwing random words to increase my post counter
  • Posts: 1,029
Developer of RCNR, Zombie Survival, VLSM(C++) and Infected City Survival

Nihongo^

  • Full Member
  • Posts: 213