Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: bad argument #2 on 'OnTimerElapse' (string expected, got nil)
stack traceback:
[C]: in function 'OnTimerElapse'
(none): in function 'OnStart'
(none): in function 'Start'
(none): in function 'Start'
(none): in function 'ActivateObjectSet'
(none): in function <(none):317>
Can anyone tell me what to do?
Re: Timer not working
Posted: Sun Jul 05, 2009 7:01 pm
by YaNkFaN
the .lua doesn't know when to start to look for a timer ie the player needs to be detected this is a copy of a working timer i made I edited to fit your needs just copy and paste this into your.lua and see if it works
Perhaps I should've mentioned that this is a campaign map and this timer starts within an objective.
I copied that stuff in, same thing happens. No crashes, but no Victory ever appears. Same Severity 3 error.
Re: Timer not working
Posted: Mon Jul 06, 2009 10:05 pm
by [RDH]Zerted
KnightsFan wrote:CallProc failed: bad argument #2 on 'OnTimerElapse' (string expected, got nil)
That is a bit strange. It's saying the target1_timer on the second to last line has the value nil. I'm not seeing why thats the case. Maybe it goes out of scope or because of the DestoryTimer()... Anyway, try referencing the timer by name instead of by the return value from CreateTimer(). I edited your code to reflect this:
I added the "s in (weird that the asset scripts don't use them) and now the Victory works. But still no animation playing. I just made sure the animations are there in ZE, BTW.
Re: Timer not working
Posted: Tue Jul 07, 2009 12:06 pm
by YaNkFaN
did you save the animation file in ZE? like a box comes up that says all's good here boss or something like that
Re: Timer not working
Posted: Tue Jul 07, 2009 2:23 pm
by KnightsFan
Yes, I saved.
Seems I forgot to post my error log before...
Hidden/Spoiler:
Opened logfile BFront2.log 2009-07-07 1153
shell_interface: Entered
shell_interface: Reading in custom strings
ifs_era_handler - Entered
ifs_era_handler - Exited
custom_GetSPMissionList()
custom_GetMPMissionList()
custom_EraButtonList(): Building era button table
custom_EraButtonList(): Finished building era button table Known eras buttons: 28
custom_GetGMapEras(): Building era table
custom_GetGMapEras(): Finished building era table Known eras: 28
custom_GetGMapModes(): Building game mode table
custom_GetGMapModes(): Finished building game mode table Known Modes: 38
custom_GetMPGameModeList(): Building game mode list table
custom_GetMPGameModeList(): Finished building game mode list table List Length: 39
custom_SetMovieLocation()
custom_AddEraBoxes()
custom_SetMovieLocation()
custom_AddEraBoxes()
ingame stream movies\crawl.mvs
shell_interface: Opening movie: movies\shell.mvs
shell_interface: Leaving
Found side\rvs.lvl. Adding ADS's extra missions
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit
Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
ifs_missionselect_pcMulti_fnSetMapPreview(): Defaulting index to 1
this.CurButton = check_mode10
cur_button = nil
Checkbox for check_era3 clicked
this.CurButton = check_era3
cur_button = nil
custom_AddMapNew()
custom_printTable(): table: 03CC116C
The key, value is: blue 0
The key, value is: mode_con_c 1
The key, value is: isModLevel 1
The key, value is: bSelected 1
The key is mapluafile, the formated value is: KMO<A>_<B>
The key, value is: era_c 1
The key, value is: green 128
The key, value is: era_g 1
The key, value is: mode_con_g 1
The key, value is: mode_c_c 1
The key, value is: red 0
custom_printTable(): Returning
custom_printTable(): table: 03CC66CC
The key, value is: key mode_con
The key, value is: subst con
The key, value is: showstr modename.name.con
The key, value is: descstr modename.description.con
The key, value is: icon mode_icon_con
custom_printTable(): Returning
gMapEras.key = era_c Era = era_c subst = c
Adding map: KMOc_c idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil
Message Severity: 2
.\Source\SkyManager.cpp(122)
Skyfile FarSceneRange is in old format
Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(2523)
Timer "victoryTimer" not found
Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(2523)
Timer "delayTimer" not found
Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(2523)
Timer "dittyTimer" not found
release self.dittyTimerResponse
release self.dittyTimerResponse
Re: Timer not working
Posted: Tue Jul 07, 2009 10:55 pm
by [RDH]Zerted
Try pausing and rewinding the animation before you play it. If that doesn't work, reread the animation docs to see if you missed something.
Re: Timer not working
Posted: Wed Jul 08, 2009 11:47 am
by KnightsFan
The animation isn't the problem. It plays fine if I play it without the timer. Something is probably wrong with my timer code. I don't have to load up any external codes or anything, do I?