steamworks/VoteInfo

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Also menu state)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
{{Func
 
{{Func
|Name=VoteInfo
+
|Description={{Deprecated|Use data {{LibraryFunction|steamworks|FileInfo}} instead.}}
|Parent=steamworks
+
 
|Description=Retrieves vote info of supplied addon.
+
Retrieves vote info of supplied addon.
 +
 
 +
{{NextUpdate|Will become deprecated as {{LibraryFunction|steamworks|FileInfo}} already carries this info.}}
 
|Realm=Client and Menu
 
|Realm=Client and Menu
 
|IsClass=No
 
|IsClass=No
Line 17: Line 19:
 
}}
 
}}
 
{{Example
 
{{Example
| Description = Retrieves vote info of Gm_construct_Beta Steam Workshop addon.
+
|Description=Retrieves vote info of Gm_construct_Beta Steam Workshop addon.
| Code = steamworks.VoteInfo( 21197, function( result ) PrintTable( result ) end)
+
|Code=steamworks.VoteInfo( 21197, function( result ) PrintTable( result ) end)
| Output = A table printed into console:
+
|OutputFixedWidth=Fixed width
score = 0.97182178497314
+
|Output=score = 0.97182178497314
total = 2952
+
total = 2952
down = 36
+
down = 36
up = 2916
+
up = 2916
 
}}
 
}}

Latest revision as of 16:53, 27 November 2019

 steamworks.VoteInfo( )

Contents

Description

This feature is deprecated.
You should avoid using it as it may be removed in a future version.

Use data steamworks.FileInfo instead.

Retrieves vote info of supplied addon.


Next Update Change

Will become deprecated as steamworks.FileInfo already carries this info.

Arguments

string workshopItemID

The ID of workshop item.

Arguments

function resultCallback

The function to process retrieved data. The first and only argument is a table, containing all the info.

Examples

Example

Retrieves vote info of Gm_construct_Beta Steam Workshop addon.

steamworks.VoteInfo( 21197, function( result ) PrintTable( result ) end)

Output:

score = 0.97182178497314
total = 2952
down = 36
up = 2916
Personal tools
Navigation