-- Allow External Access
local ProPlayers = {}
-- An Array that stores dictionaries of players and their stats
Pros = {
TestPro1 = {
Strength = 50,
Speed = 60,
Power = 70
},
TestPro2 = {
Strength = 70,
Speed = 60,
Power = 50
}
}
-- Return Requested Pro Player Stats
function ProPlayers.getProPlayer(Pro)
print(Pro)
for i = 0, #Pros do
print(Pros[i])
if tostring(Pros[i]) == Pro then
return Pros[i]
end
end
end
return ProPlayers
--------------------------
Everytime I call the function in a script it returns nil. I tried the argument "TestPlayer2" for (Pro). Any suggestions?
|