• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Player:getDescription(lookDistance)

Breed

Intermediate OT User
Joined
Jan 7, 2015
Messages
517
Reaction score
122
------------------------------------------------------------------------------
 
Last edited:
No, it returns a table of Player userdatas.
https://github.com/otland/forgottenserver/blob/master/src/luascript.cpp#L10306

So, you can use table.getn() or simply add a # in front of the table to get the number of items.

An example (using #)
Code:
local player = Player(cid)
local guild = player:getGuild()

print(#guild:getMembersOnline())

This would just print how many guildmembers are online.
 
------------------------------------------------------------------------------
 
Last edited:
One tip, dont change your title, you only need to switch to SOLVED, the reason is because there might be someone else with the same problem that can use this thread, but to do that they need to be able to find it.
 
Back
Top