Hello,
I would like to find a way to get this method which is supposed to output a table with the raw string values of each airport name to work. Currently not even the method is being triggered/fired.
I would greatly appreciate any help.
My module script:
01 | local airport = { } |
02 |
03 | airport.destinations = { |
04 | Zakynthos = { |
05 | Name = "Zakynthos" ; |
06 | IATA = "ZAK" |
07 | } |
08 | } |
09 |
10 | airport.airlines = { |
11 | Airline = { |
12 | Name = "Airline" ; |
13 | GroupID = 1 ; |
14 | IATA = "AA" ; |
15 | Destinations = { |
Script
1 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
2 |
3 | local dest = airportData.airlines.Airline:GetDestinations() |
4 |
5 | for i, v in ipairs (dest) do |
6 | print (v) |
7 | end |
Thank you!
Why do you have a GetDestinations method when you just re-iterate through them? Just iterate through airportData.airlines.Airline.Destinations
. There's no point in having a method.
You're just over thinking it, bud.
Hope you can accept this as an answer.