Is there a way to print/display a structure of an object (self, level etc.) like it is made for example in PHP (vardump()/print_r()) ?
Is there a way to print/display a structure of an object (self, level etc.) like it is made for example in PHP (vardump()/print_r()) ?
Not directly: https://killtube.org/showthread.php?...5105#post15105
Ni3ls (14th February 2017)
I believe that you misunderstood my question. For example: I used "magic function" on player object and I would like to get back something like this:
But with every variable that is "binded" to that structure. I would like to know what variables does level/player have.PHP Code:
Object (
[name] => "Whiskas"
[pers] => Array
(
[team] => "spectator"
[weapon] => undefinded
[savedmodel] => undefined
[skipserverinfo] => undefined
)
[score] => 6
[death] => 2
[sessionstate] => "playing"
[maxhealth] => 100
[health] => 100
[friendlydamage] => undefined
[statusicon] => ""
)
Last edited by Whiskas; 14th February 2017 at 17:35.
Ahh, got it
iirc libcod also has GetArrayKeys() implemented, that works like the CoD4 version (see script reference for that) but this would work only for arrays, not objects..)
Whiskas (14th February 2017)