Code: Select all
local SUB1=ScenEdit_GetKeyValue('SUB1')
if SUB1==nil then
SUB1='0'
end
local SUB2=ScenEdit_GetKeyValue('SUB2')
if SUB2==nil then
SUB2='0'
end
local SUB3=ScenEdit_GetKeyValue('SUB3')
if SUB3==nil then
SUB3='0'
end
local SUB4=ScenEdit_GetKeyValue('SUB4')
if SUB4==nil then
SUB4='0'
end
local SUB5=ScenEdit_GetKeyValue('SUB5')
if SUB5==nil then
SUB5='0'
end
local SUB6=ScenEdit_GetKeyValue('SUB6')
if SUB6==nil then
SUB6='0'
end
local SUB7=ScenEdit_GetKeyValue('SUB7')
if SUB7==nil then
SUB7='0'
end
local SUB8=ScenEdit_GetKeyValue('SUB8')
if SUB8==nil then
SUB8='0'
end
local SUB9=ScenEdit_GetKeyValue('SUB9')
if SUB9==nil then
SUB9='0'
end
local SUB10=ScenEdit_GetKeyValue('SUB10')
if SUB10==nil then
SUB10='0'
end
local SURFACE1=ScenEdit_GetKeyValue('SURFACE1')
if SURFACE1==nil then
SURFACE1='0'
end
local SURFACE2=ScenEdit_GetKeyValue('SURFACE2')
if SURFACE2==nil then
SURFACE2='0'
end
local SURFACE3=ScenEdit_GetKeyValue('SURFACE3')
if SURFACE3==nil then
SURFACE3='0'
end
local mess='The remaining telports are:\n\nSUB 1 ('..SUB1..')\n\nSUB 2 ('..SUB2..')\n\nSUB 3 ('..SUB3..')\n\nSUB 4 ('..SUB4..')\n\nSUB 5 ('..SUB5..')\n\nSUB 6 ('..SUB6..')\n\nSUB 7 ('..SUB7..')\n\nSUB 9 ('..SUB9..')\n\nSUB 10 ('..SUB10..')\n\nSURFACE 1 ('..SURFACE1..')\n\nSURFACE 2 ('..SURFACE2..')\n\nSURFACE 3 ('..SURFACE3..')'
ScenEdit_MsgBox(mess, 1)
SUB 2 ()
etc
With the error check built in as all the Key Values are nil in this iteration, the values should all be converted to '0'.
So I have two questions: why am I not getting the proper data inserted into the message? I have used the ('..variable..') syntax before and it works. Secondly, why is my message box so small and more importantly is there a way to make it bigger?
Thanks as always. I have been coding a lot this weekend and my brain is a bit fried. Just hoping you nice people can detangle this for me