Deltagamer163 Posted May 12, 2020 Share Posted May 12, 2020 (edited) So, I'm making a terminal that allows you to check in and check out of a hotel room. The check in command is supposed to check if you have the proper caps to buy, and also check if you have a key already, and gives you a key and takes the caps if you have the proper amount. The scripts work well, and if you don't have the caps it won't give a key, but I noticed that I can still check in if I have a key already.Could somebody help? Here is the code: float capsgood float nokey if Player.GetItemCount Caps001 >= 50 set capsgood to 1 else ShowMessage InvalidCapsTops endif if Player.GetItemCount TopsHotelRoomKey < 1 set nokey to 1 else ShowMessage AlreadyCheckedIn endif if capsgood == 1 and nokey == 1 player.additem TopsHotelRoomKey 1 player.removeitem Caps001 50 set capsgood to 0 set nokey to 0 endif Edited May 12, 2020 by Deltagamer163 Link to comment Share on other sites More sharing options...
Deltagamer163 Posted May 12, 2020 Author Share Posted May 12, 2020 In case any new modders have a similar issue to mine, I solved the problem. It seems that if commands cannot use "and", so instead I made it so that if you have at least 1 key, it will just set "capsgood" back to 0 and tell you that you are already checked in, and then made it so that it only checks if capsgood is 1 before giving a key. Link to comment Share on other sites More sharing options...
dubiousintent Posted May 12, 2020 Share Posted May 12, 2020 (edited) NVSE uses the "&&" symbol for the "AND" operator in a "compound condition". The list of NVSE operators is here. The entire purpose of NVSE (and the various addons to it such as "JIP LN") is to provide modern programming functions left out of the basic GECK tool. Alternatively (if you insist on not using NVSE or need to debug a complex compound conditional test) the logical "AND" operation is a single command line equivalent to a pair of nested "IF" conditional tests: If (test1) then If (test2) then <both test statements are true> Else <test2 is false, but test1 is still true> EndIf Else <test1 is false, and test2 was never evaluated> EndifThe basic "IF ... Then ... ElseIf ... Else" structure is a "logical OR": If (test1) then <test1 is true> ElseIf (test2) then <OR test2 is true and only tested if "test1" failed> Else <all previous individual tests failed> EndIf Considering that most mods require NVSE these days, any author insisting on avoiding it has an "undiagnosed mental condition" (in my opinion. I have yet to see a reasonable explanation for that position).-Dubious- Edited May 12, 2020 by dubiousintent Link to comment Share on other sites More sharing options...
Deltagamer163 Posted May 12, 2020 Author Share Posted May 12, 2020 Thanks for telling me this. I have NVSE for the game. How do I install it to GECK? Link to comment Share on other sites More sharing options...
UnvalidUserName Posted May 12, 2020 Share Posted May 12, 2020 Through the terminal or a direct access: nvse-loader.exe -editor Link to comment Share on other sites More sharing options...
Deltagamer163 Posted May 12, 2020 Author Share Posted May 12, 2020 Alright Link to comment Share on other sites More sharing options...
Mktavish Posted May 14, 2020 Share Posted May 14, 2020 In case you are still a bit unsure how/what to do.Take the FoseLoader.exe from inside the install location same place you find the Game & Geck.exeRight click ,Make a shortcut or send to desktop ... then right click the new shortcut , select properties.In the shortcut window it pops up on the "Shortcut" tab ...Go to the Target field , and add at the end outside the quote" -editornotice there is 1 space after the quote. Click apply , OKNow you use this shortcut every time to launch the Geck. By the way that is some good thinking skills to get stuff done with what ya know.Keep it up , it will serve you well in figuring out the nuances of the geck. ;) Link to comment Share on other sites More sharing options...
Deltagamer163 Posted May 14, 2020 Author Share Posted May 14, 2020 That helps a lot more. I was going to ask for further help on how to use nvse for geck. Thank you! Link to comment Share on other sites More sharing options...
dubiousintent Posted May 15, 2020 Share Posted May 15, 2020 (edited) It's worth pointing out that Mktavish primarily works on FO3, so he tends to mix up FOSE and NVSE. (NVSE includes everything from FOSE.) Just use whichever is appropriate for the game you are modding. The "GECK Extender" mod (recommended) has a "GECK Patcher" file "to make your GECK 4GB aware and also auto load NVSE as well as fix many bugs in the edit forms (required)". The Extender is a later replacement for the "GECK 1.4 PowerUp" mod. (Do not use both together.) Once patched, you just launch the GECK as always. -Dubious- Edited May 15, 2020 by dubiousintent Link to comment Share on other sites More sharing options...
Recommended Posts