Jump to content
The simFlight Network Forums

mroschk

Members
  • Content Count

    131
  • Joined

  • Last visited

Community Reputation

1 Neutral

About mroschk

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  • Location
    germany

Recent Profile Visitors

1,114 profile views
  1. ahhh, thats the way.... Now i understand I come from C#, and here you set/clear the Bit via the BitNumber directly. Thanks very much Matthias
  2. now i am completely confused. So, easy question, what must i do to set ( as example ) bit 5 of Offset 5400 to 1 ? Matthias
  3. but it works and i dont need to OR the bits. ipc.setbitsUB(0x5400, 1) is not setting bit 1 to 1 and ipc.setbitsUB(0x5400, 2) is not setting bit 2 to 1. Matthias
  4. Hello, yes, i do it like you say. I add to the flag variable 1,2,4,8,16,32,64 if the doorflag is set an use writeUB to set the bits. Thanks Matthias
  5. Oh je, my mistake, sorry.... As you can see, i forgot to remove the "ipc.writeUB" in the last line...sorry, it works now "" Thanks Matthias
  6. Hello, i dont know why it is not working: function DoorState() local flag = 0 --if doorflag0 == 1 then flag = flag + 1 end --if doorflag1 == 1 then flag = flag + 2 end --if doorflag2 == 1 then flag = flag + 4 end --if doorflag3 == 1 then flag = flag + 8 end --if doorflag4 == 1 then flag = flag + 16 end --if doorflag5 == 1 then flag = flag + 32 end --if doorflag6 == 1 then flag = flag + 64 end if doorflag0 == 1 then ipc.setbitsUB(0x5400, 1) end if doorflag1 == 1 then ipc.setbitsUB(0x5400, 2) end if doorflag2 == 1 then ipc.setbitsUB(0x5400, 3) end if doorflag3 == 1 then ipc.setbitsUB(0x5400, 4) end if doorflag4 == 1 then ipc.setbitsUB(0x5400, 5) end if doorflag5 == 1 then ipc.setbitsUB(0x5400, 6) end if doorflag6 == 1 then ipc.setbitsUB(0x5400, 7) end --ipc.display("DoorState " ..flag, 3) ipc.writeUB(0x5400, flag) end The ipc.setbits is not working. The version with the "--" is working fine. I know it is doing the same, but it would be nice to know why the setbits is not working? Matthias
  7. Hello, but i testet also ipc.setbitsUB(0x5302, 1) but it seams not to work here. I will test it again this night. Thanks for the Answer and for testing that Matthias
  8. Hello, i have this little function in a LUA Script to check/set the DoorSTate. function DoorState() ipc.display("Doors", 3) ipc.setbitsUB(0x5302, 0) ipc.setbitsUB(0x5302, 1) end as you can see, i have testet if this script-function is called, and it is. But the Offset is not set after the function is called. Have you any idea why ? Thanks Matthias
  9. Hello, i have still no solution found, why the "event.sim(ANY, and also the "event.sim(AIRCRAFTCHANGE is not fired ? When i have a little lua file in the Modules folder whits only this little script: function test() ipc.display("test") end event.sim(ANY, "test") why is the text not displayed when i load another aircraft ?( which means the function is not called at Aircraft change ) Matthias
  10. Hello, oh, i am sorry about posting in the wrong section, maybe a admin can move the topic. Thanks for the answer, i will try... MR .... it works...thx
  11. Hello, i have a little Lua Script which should set a offset when i start the sim . function LightsCLEAR() ipc.display("LightsCLEAR") ipc.setbitsUB(0x5301, 1) ipc.setbitsUB(0x5301, 2) ipc.setbitsUB(0x5301, 4) ipc.setbitsUB(0x5301, 8) ipc.setbitsUB(0x5301, 16) ipc.setbitsUB(0x5301, 32) ipc.setbitsUB(0x5301, 64) ipc.setbitsUB(0x5301, 128) end event.sim(ANY, "LightsCLEAR") but it is only running, when i change the Time in the sim, as example from Day to Night. Why is the script not running when i start the sim? Or how can i run a script, when the sim starts? thx MR
  12. Hallöchen mal wieder, anscheinend bist du ja richtig fit mit der FSUIPC. Darf ich dich fragen, ob du irgendwie ein event einbaue könntest, welches man abonnieren kann um den Status abzufragen? Matthias
  13. Hello, i tested your new dll ... worked perdect now !! Matthias
  14. Tested...works perfect now !!! Matthias
  15. Hello, thanks for that info, but i must ask a (stupid) question if that dll is the one which runs in the sim or the one i must use in my Programm ? Sorry for the stupid question 🙂 Matthias
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.