PDA

View Full Version : how to distinguish between G4 and G5 in lua ?



mhwlng
December 10th, 2006, 06:00 AM
I am trying to use the same GML/lua files for G4 and G5

I have one difference :

girder 4

require("odbc", "luaopen_luasqlodbc" )

girder 5

require ( 'luasqlodbc')

is there some conditional construction that I can use that executes the relevant line automatically ?

Marcel

Rob H
December 10th, 2006, 07:53 AM
local v = gir.GetGirderVersion();

if ( v.Major > 4 ) then
-- your code here for G5
end

mhwlng
December 10th, 2006, 07:59 AM
that works ok, thanks...

Marcel