Reading a value from dvar like "ugxm_players"

broken avatar :(
Created 2272 days ago
by Ray1235
0 Members and 1 Guest are viewing this topic.
1,172 views
broken avatar :(
×
broken avatar :(
The OG Polish Modder
Location: pl
Date Registered: 19 June 2013
Last active: 281 days ago
Posts
1,666
Respect
Forum Rank
Zombie Destroyer
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
#RyukoRocks
Signature
[FS] Social Networking, Lead Animator and Scripter
[You are not allowed to view external links. Register or Login to see them]
[You are not allowed to view external links. Register or Login to see them]
×
Ray1235's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
So I got the objective system planned and some of it scripted and the problem is when I want a character to say something which depends on this how many players are there. I tried if(ugxm_players==1){ *chunk of code* } and it says variable ugxm_players not initialised. I need help with that.
broken avatar :(
×
broken avatar :(
[UGX] Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 10 days ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature
[You are not allowed to view external links. Register or Login to see them]
(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Well is that variable initialized? If I needed to check something like that I would do:

players = GetPlayers();
if(players.size == 1)
{
/*code*/
}

 

Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Twitch
Loading ...