|
| 08 Jan 2016 09:46 PM |
if term.owner.Value == "none" then cap_term_first_time(find_team(player.TeamColor)) -- CAP TERM FIRST TIME else cap_term(find_team(player.TeamColor)) -- CAP TERM ANY OTHER TIME end
For some reason this always fires the "else" portion. I can't figure out why. I printed out "term.owner.Value" right before this line of code and it prints out "none" which is exactly the condition that should make it fire the first part, not the else part.
I'm so confused. |
|
|
| Report Abuse |
|
|
| |
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 09 Jan 2016 12:17 PM |
| Do you actually set the value of term.owner.Value to the string/word "none" somewhere in the script? Or is it supposed to literally have no string inside of the value? |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 12:18 PM |
| nil is not "none" it is nil. It means nothing. |
|
|
| Report Abuse |
|
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 09 Jan 2016 12:20 PM |
"nil is not "none" it is nil. It means nothing."
Exactly, I'm just unsure if he actually sets the string to be "none" when there is no value put in there. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 01:27 PM |
Well it was originally set to nil, but after it didn't work, I tried setting it to "none." just to see.
The StringValue by default is set to "none". |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2016 06:18 PM |
| I still can't figure this out. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|