Lazulite
|
  |
| Joined: 09 Jun 2014 |
| Total Posts: 1217 |
|
|
| 23 Jun 2014 03:23 PM |
Problem: It's always giving me "ERROR: RANK NOT FOUND". It should give me [C2] Chief. This is a script. Structure: Script < Textbox < Frame < Gui < PlayerGui < ?Player?
local player = script.Parent.Parent.Parent.Parent.Parent local t = script.Parent local rank = player:GetRoleInGroup(753797)
-- TODO: Switch if / else structure to key / value pairs in table
if rank == 2 then t.Text = "[L1] TRIBUTARY" elseif rank == 3 then t.Text = "[L2] NOVICE" elseif rank == 4 then t.Text = "[L3] NEOPHYTE" elseif rank == 5 then t.Text = "[L4] GLADIATOR" elseif rank == 6 then t.Text = "[L5] KNIGHT" elseif rank == 7 then t.Text = "[L6] BLADEMASTER" elseif rank == 8 then t.Text = "[M1] BANE" elseif rank == 9 then t.Text = "[M2] ADMIRAL" elseif rank == 10 then t.Text = "[M3] GENERAL" elseif rank == 11 then t.Text = "[M4] WARLORD" elseif rank == 12 then t.Text = "[M5] PRIME" elseif rank == 13 then t.Text = "[-] FOREIGN DIPLOMAT" elseif rank == 14 then t.Text = "[H1] CENTURION" elseif rank == 15 then t.Text = "[H2] ROYAL" elseif rank == 16 then t.Text = "[H3] IMMORTAL" elseif rank == 17 then t.Text = "[H4] IMPERIAL" elseif rank == 18 then t.Text = "[C1] HICOM" elseif rank == 255 then t.Text = "[C2] CHIEF" else t.Text = "ERROR: RANK NOT FOUND" end |
|
|
| Report Abuse |
|
|
| |
|
Lazulite
|
  |
| Joined: 09 Jun 2014 |
| Total Posts: 1217 |
|
|
| 23 Jun 2014 03:26 PM |
| no its GetRoleInGroup() alex get good at RBX.Lua !111 |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2014 03:28 PM |
| Were you not trying to see what rank they are? |
|
|
| Report Abuse |
|
|
Lazulite
|
  |
| Joined: 09 Jun 2014 |
| Total Posts: 1217 |
|
|
| 23 Jun 2014 03:28 PM |
| http://wiki.roblox.com/index.php?title=GetRoleInGroup_(Method) |
|
|
| Report Abuse |
|
|
youssef04
|
  |
| Joined: 22 Jan 2011 |
| Total Posts: 1745 |
|
|
| 23 Jun 2014 03:30 PM |
| Laz, she's right, use GetRankInGroup(), you can do something.Text = GetRankInGroup(4736) |
|
|
| Report Abuse |
|
|
Lazulite
|
  |
| Joined: 09 Jun 2014 |
| Total Posts: 1217 |
|
|
| 23 Jun 2014 03:31 PM |
nooo
Alex got an RBX.Lua question right
can't have this happen!
will test it thanks |
|
|
| Report Abuse |
|
|
|
| 23 Jun 2014 03:32 PM |
| GetRoleInGroup() returns a string, not a number. |
|
|
| Report Abuse |
|
|