Crash without a trace [Solved]
Posted: Sat May 23, 2009 11:40 pm
I'm trying to make a controlled teleport (whether or not somebody already is doesn't matter much to me). The system is basically you enter the region of a panel and it will activate the appropriate teleport region. Before I could get it to turn on, but not off, and there were too many errors so I started over. Now whenever I enter the region, it crashes. When I look in the error log, it makes no reference to the crash and doesn't really acknowledge that anything happened out of the ordinary. The PC_Mungelog also does not report any errors.
Here is my function:
The "ActivateRegion" command for the region is up higher in the PostLoad section.
I also have a question that would help eliminate the panel region entirely:
If I use OnObjectKill for the panel, and that activates the teleport region,
then I have a region at the other end that turns off the region and puts the panel back,
If I use OnLeaveRegion> RespawnObject, will that make the panel come back to life?
EDIT: I put the function in code format so it represented the tabs correctly.
EDIT2
(Sorry about double post)
Ok, so I got it to not crash, but the teleport region doesn't turn on.
IS the error.
Is my script.
Here is my function:
Code: Select all
OnEnterRegion(
function(region,character)
if GetEntityName(region) == ("tombcastle_panel") then
ActivateRegion("tombcastle")
end
end,
"tombcastle_panel"
)I also have a question that would help eliminate the panel region entirely:
If I use OnObjectKill for the panel, and that activates the teleport region,
then I have a region at the other end that turns off the region and puts the panel back,
If I use OnLeaveRegion> RespawnObject, will that make the panel come back to life?
EDIT: I put the function in code format so it represented the tabs correctly.
EDIT2
(Sorry about double post)
Ok, so I got it to not crash, but the teleport region doesn't turn on.
Code: Select all
Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: bad argument #2 to `OnEnterRegion' (string expected, got no value)
stack traceback:
[C]: in function `OnEnterRegion'
(none): in function `ScriptPostLoad'Code: Select all
ActivateRegion("tombcastle_panel")
OnEnterRegion(
function(regIn,character)
MoveEntityToNode(character,"tombcastle_node")
end,
"tombcastle"
)
OnEnterRegion(
function(region,character)
if GetEntityName(region) == ("tombcastle_panel") then
ActivateRegion("tombcastle")
end
end
)
end