Page MenuHomeFeedback Tracker

"owner" always returns 0
Closed, ResolvedPublic

Description

Created an object after missionstart, owner is 0. Everything I want to check (vehicle player etc) returns 0. Even owner player returns 0. {F26687}

Details

Legacy ID
1522025508
Severity
None
Resolution
No Bug
Reproducibility
Always
Category
Scripting

Event Timeline

Thelia set Category to Scripting.Jul 22 2015, 1:06 PM
Thelia set Reproducibility to Always.
Thelia set Severity to None.
Thelia set Resolution to No Bug.
Thelia set Legacy ID to 1522025508.May 8 2016, 12:25 PM
Bohemia added a subscriber: Thelia.Jul 22 2015, 1:06 PM

On server machine, returns the ID of the client where the object is local. Otherwise returns 0.

You can use it on the server only.

Usage of owner is for server executed scripting. The server is the only one that can return a proper owner id for the player (s). Try it in a server executed script and add a diag_log line to produce good working result

As was mentioned before, works only on server (think it even has a fancy serverExec icon on BIKI page)