Iris2.de http://iris2.de/forum/ |
|
Variable problem http://iris2.de/forum/viewtopic.php?f=16&t=1664 |
Page 1 of 1 |
Author: | josemdark [ Sun Sep 26, 2010 9:56 pm ] |
Post subject: | Variable problem |
I've replaced the main menu bg with a 3d scene. I saw the text that appears before you select a character (skills, position...) and I had and idea. Rendering the character with the equipment before entering game would be nice. So I did it. Code: function MainMenu_CharList_DrawCharacter () local chardata = GetCharFileData(user,0) if (chardata) then local maxlayers = 24 local layers = 1 local arr = {} for layers = 1, maxlayers do if (chardata.equip[layers]) then --table.insert(arr,chardata.equip[layers].artid) local tiledata = GetStaticTileType(chardata.equip[layers].artid) local modelid = tiledata.miAnimID table.insert(arr,(string.format("{artid=%s,animid=%s,hue=%s}", chardata.equip[layers].artid, modelid, chardata.equip[layers].hue))) end end local charequip = table.concat(arr,",") print ("GetCharEquip", charequip) MainMenuShowModel(400,0,5,0,{charequip}) end end When I click on a shard to login with and account (to go to the character selection menu) the client crashes. I'm a noob programming so it's normal. But if I replace the "charequip" variable on the "MainMenuShowModel" function with the print output it works. Code: $ irisuo Pulseaudio detected /usr/share/games/ultimaonline/iris/bin /usr/share/games/ultimaonline/iris MAIN_WORKING_DIR=.. probing: ../lua/main.lua probing: ../lugre/lua/ lua main file: ../lua/main.lua lua lugre dir: ../lugre/lua/ main working dir: ../ MainWorkingDir ../ lugreluapath ../lugre/lua/ LoadShardList uogamers.com /home/josem/.iris/config/shards/uogamers.com.xml .xml LoadShardList Localhost /home/josem/.iris/config/shards/Localhost.xml .xml gGraphicProfile high Setting Graphicprofile: ../lua/profiles/gfx_high.lua uo protocol version used by iris 6092 Lua version : 5.1 Ogre platform : linux loading plugin ../plugins/example.lua loading plugin ../plugins/hudenemylist.lua loading plugin ../plugins/itemcounter.lua loading plugin ../plugins/lib.spellbar.lua loading plugin ../plugins/loot.lua loading plugin ../plugins/minergrid.lua loading plugin ../plugins/moblist.lua warning, ImportRazorProfile file not found C:/Program Files/Razor/Profiles/default.xml initializing ogre... OGRE_VERSION 10604 OGRE_BASE_DIR ../bin/ OGRE_PLUGIN_DIR /usr/lib/OGRE ###################### ### GfxConfig_Apply... >>>gGfxConfig_RenderSystem >nil< >>>gGfxConfig_Resolution >nil< >>>gGfxConfig_Fullscreen >nil< >>>gGfxConfig_AntiAliasing >4< GfxConfig_FindDefaultRenderSystem OpenGL Rendering Subsystem bPreferOpenGL: true GfxConfig_FindDefaultResolution 1024 x 768 >>>gGfxConfig_RenderSystem >OpenGL Rendering Subsystem< >>>gGfxConfig_Resolution >1024 x 768< >>>gGfxConfig_Fullscreen >false< >>>gGfxConfig_AntiAliasing >4< GfxConfig_SetOgreConfig: value set >FSAA< >4< GfxConfig_SetOgreConfig: value set >Full Screen< >No< GfxConfig_SetOgreConfig: value set >Video Mode< >1024 x 768< bIsFullScreen=0 GetOgreVersion 0x10604 .ogre1.6 OgreInitResLocs... OgreInitResLocs done initializing ogre done cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont.mul) : 1.4 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont1.mul) : 1.4 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont2.mul) : 1.4 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont3.mul) : 2.5 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont4.mul) : 3.9 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont5.mul) : 2.2 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/unifont6.mul) : 3.3 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/tiledata.mul) : 1.6 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/texmaps.mul) : 28.1 MB SoundInit(fmod,22050.000000) gGuiSystem2Ok true cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/anim.idx) : 1.7 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/anim3.idx) : 1.5 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/animdata.mul) : 2.1 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/art.mul) : 63.7 MB cFullFileLoader(/home/fakeroot/usr/share/games/ultimaonline/gumpart.mul) : 52.2 MB strShadowTechnique = texture_additive setShadowFarDistance = 120 gTileFreeWalk:UpdateGroundCache : warning, no maploader(yet) GrannyTest3DData:ok {animid=0,scalex=1.600000,bodyid=400=0x0190,modelname="h_male",defhue="FFFFFFFF",scalez=1.500000,scaley=1.400000,hand=0,typeid=3,} ERROR LoadGrannyAnim /home/fakeroot/usr/share/games/ultimaonline/Models/Animals/CuShidhe_Eat.grn 277 3 table: 0xa4909b0 table: 0xa490ae0 ERROR LoadGrannyAnim /home/fakeroot/usr/share/games/ultimaonline/Models/Animals/CuShidhe_GetHit.grn 277 7 table: 0xa4909b0 table: 0xa490ae0 submesh mat 0 mainmenu 1 PingStep NextTimeUpdateDetected t/next 11399 0 GetCharFileData josemdark 0 0 /home/josem/.iris/config/chars/ultimaeclipse.servegame.com.2595.josemdark.0.0.xml GetCharFileShortInfo josemdark 0 table: 0xd0b55c0 GetCharFileData josemdark 1 0 /home/josem/.iris/config/chars/ultimaeclipse.servegame.com.2595.josemdark.0.1.xml GetCharFileShortInfo josemdark 1 table: 0xd0dc010 520 msec mem:L= 501k O= 4k 3D:MousePick:MousePick_ShowHits 1732 msec mem:L= 400k O= 0k 3D:MousePick:MousePick_ShowHits disconnect PingStep NextTimeUpdateDetected t/next 15737 76266 initializing packets for 6.0.1.7 or later ############# + + ++ +++ + +++ + +gSubServerNamesByID 0 Eclipse 69.162.105.66 NET: server redirect: id=0x0000008c ip=69.162.105.66 port=2595 AccountNr.:0x070ba6c0 ++++++ MainMenuShowCharList : recevived kPacket_Character_List 0xA9 GetCharFileData nil 0 0 /home/josem/.iris/config/chars/ultimaeclipse.servegame.com.2595.josemdark.0.0.xml GetCharEquip {artid=3834,animid=984,hue=1328},{artid=5901,animid=479,hue=1289},{artid=11115,animid=946,hue=0},{artid=7933,animid=435,hue=1450},{artid=5138,animid=563,hue=1364},{artid=5062,animid=545,hue=0},{artid=4234,animid=498,hue=1324},{artid=4232,animid=497,hue=1165},{artid=5435,animid=466,hue=193},{artid=7942,animid=508,hue=0},{artid=5441,animid=490,hue=1177},{artid=4231,animid=496,hue=0},{artid=5198,animid=556,hue=1109},{artid=12215,animid=896,hue=1261},{artid=3701,animid=422,hue=0},{artid=9860,animid=970,hue=578} LuaErrorHandler start LuaErrorHandler end lugre/src/lugre_main.cpp:221:Lugre_Run lugre/src/lugre_game.cpp:19:Run lugre/src/lugre_scripting.cpp:271:LuaCall lugre/src/lugre_scripting.cpp:6801038:lugre/src/lugre_main.cpp:221:Lugre_Run lugre/src/lugre_game.cpp:19:Run lugre/src/lugre_scripting.cpp:271:LuaCall ./start.sh: línea 6: 29045 Violación de segmento ./iris $@ /usr/share/games/ultimaonline/iris Any ideas? PD: Is there a bugtracker or something to report bugs? The trac bugtracker can't be used by non-admin users. |
Author: | SiENcE [ Thu Oct 07, 2010 11:40 am ] |
Post subject: | Re: Variable problem |
Nice Idea. I like it . When you are finished, can you send us a patch for current svn/trunk? please report bug in this forum. we disabled trac because of spam. -> viewforum.php?f=18 About your problem, i think we have to debug this. No Idea yet. If you send us your patch we can test it. |
Author: | josemdark [ Thu Oct 07, 2010 7:45 pm ] |
Post subject: | Re: Variable problem |
Here are the patches. When the variable problem is solved I'll try to display all the characters on the account instead of one, and maybe add some different backgrounds with diferent models and randomnize them on client start. lib.mainmenu.background.lua ( http://pastebin.com/GQNNeWLX ) lib.mainmenu.charcreate.lua ( http://pastebin.com/cjSah0BP ) lib.mainmenu.charlist.lua ( http://pastebin.com/46Scq5ck ) |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |