How to find Table

Is it not printing at all? Are there any errors? Do the stationName and selectedLine strings contain any hidden characters or are they misspelled?

local trainSpawnsAndLines = {[9] = {"Ostheim"}}

if trainSpawnsAndLines[9] ~= nil and table.find(trainSpawnsAndLines[9], "Ostheim") ~= nil then
	-- do stuff
end

It worked, Thanks!


1 Like
 ~= nil

This isn’t necessary by the way.

1 Like