Welcome,
Guest
. Please
login
or
register
.
April 27, 2026, 12:36:21 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
TNet 3 Support
»
Objects that are not instantiated via TNManager.Create must have a non-zero ID.
« previous
next »
Print
Pages: [
1
]
Author
Topic: Objects that are not instantiated via TNManager.Create must have a non-zero ID. (Read 3973 times)
Bug5532
Newbie
Thank You
-Given: 1
-Receive: 0
Posts: 12
Objects that are not instantiated via TNManager.Create must have a non-zero ID.
«
on:
June 05, 2014, 05:31:36 PM »
Hi,
I'm getting this message when I play my game offline. I get it whenever I instantiate an object using TNManager.Create but am not connected. This didn't use to happen?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Objects that are not instantiated via TNManager.Create must have a non-zero ID.
«
Reply #1 on:
June 06, 2014, 03:10:40 AM »
Hmm. Change the TNObject's Start() function to this:
void
Start
(
)
{
if
(
TNManager
.
isConnected
)
{
if
(
id
==
0
)
{
mParent
=
FindParent
(
transform
.
parent
)
;
if
(
mParent
==
null
&&
Application
.
isPlaying
)
{
Debug
.
LogError
(
"Objects that are not instantiated via TNManager.Create must have a non-zero ID."
,
this
)
;
return
;
}
}
else
{
Register
(
)
;
// Have there been any delayed function calls for this object? If so, execute them now.
for
(
int
i
=
0
;
i
<
mDelayed
.
size
;
)
{
DelayedCall dc
=
mDelayed
[
i
]
;
if
(
dc
.
objID
==
uid
)
{
if
(
!
string
.
IsNullOrEmpty
(
dc
.
funcName
)
)
Execute
(
dc
.
funcName
, dc
.
parameters
)
;
else
Execute
(
dc
.
funcID
, dc
.
parameters
)
;
mDelayed
.
RemoveAt
(
i
)
;
continue
;
}
++
i
;
}
}
}
}
Logged
Bug5532
Newbie
Thank You
-Given: 1
-Receive: 0
Posts: 12
Re: Objects that are not instantiated via TNManager.Create must have a non-zero ID.
«
Reply #2 on:
June 06, 2014, 03:52:50 AM »
Nice simple fix, thanks ArenMook
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
TNet 3 Support
»
Objects that are not instantiated via TNManager.Create must have a non-zero ID.