脚本一:(随机得到1--5之间的一个数)
x002117_g_scriptId = 002117
math.randomseed(os.time())--os.time()
for i=1,5 do
nRet_rw = math.random(6)
end
脚本二:(为一个函数)
function x002103_OnEventRequest( sceneId, selfId, targetId, eventId )
if nRet_rw==1 then
x002103_MY_ZH=002091
elseif nRet_rw==2 then
x002103_MY_ZH=002101
elseif nRet_rw==3 then
x002103_MY_ZH=002106
elseif nRet_rw==4 then
x002103_MY_ZH=002107
elseif nRet_rw==5 then
x002103_MY_ZH=002108
elseif nRet_rw==6 then
x002103_MY_ZH=002109
end
end
请问:如何把脚本一中获取的nRet_rw的值传递给脚本二中。请以代码的形式说明。谢谢!