DieHard3303 Posted December 9, 2011 Share Posted December 9, 2011 I am scripting some sorters and have not been successful in activating them. int AmmoCount Set AmmoCount to Player.GetItemCount Ammo10mm1DD10mmAmmo.additem Ammo10mm AmmoCountPlayer.RemoveItem Ammo10mm AmmoCount 1 They are result scripts for a terminal and I guess that I am missing something. I have tried with 1DD10mmAmmoREF also with no luck. Tanks Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted December 9, 2011 Share Posted December 9, 2011 Is 1DD10mmAmmo a container name? What is its ref name? If you haven't given it one, you need to, and use that name in your script instead of 1DD10mmAmmo. Link to comment Share on other sites More sharing options...
DieHard3303 Posted December 10, 2011 Author Share Posted December 10, 2011 Is 1DD10mmAmmo a container name? What is its ref name? If you haven't given it one, you need to, and use that name in your script instead of 1DD10mmAmmo. okay I need to give it a reference name, where would I input that as the editor ID? As you can tell I am new at the scripting end. ( yes that is the container name ) Thanks I entered the name 1DD10mmAmmoREF in the reference editor id input box for the container and changed the script to this: short AmmoCount Set AmmoCount to Player.GetItemCount Ammo10mm1DD10mmAmmoREF.additem Ammo10mm AmmoCount Player.RemoveItem Ammo10mm AmmoCount 1 and still nogo. Do I have to compile the result script ? I have tried it with compiling anda without and the results are the same no movement of the ammo. Link to comment Share on other sites More sharing options...
viennacalling Posted December 10, 2011 Share Posted December 10, 2011 Since this is the result script for a terminal, is there result text with it? Does the result text display when you select the terminal menu item? Just trying to determine if the issue is now at the terminal instead of the script. Link to comment Share on other sites More sharing options...
DieHard3303 Posted December 10, 2011 Author Share Posted December 10, 2011 Since this is the result script for a terminal, is there result text with it? Does the result text display when you select the terminal menu item? Just trying to determine if the issue is now at the terminal instead of the script. The result text is the script, I thought and yes it does show when the menu item is selected. Maybe that is where I am wrong, from the other terminal scripts I read for reference I thought that is where you code the function directly. Here is the procedure I used. I coded the function in editplus then copy - pasted it into a new menu item result script box in the terminal then compiled the result text. Link to comment Share on other sites More sharing options...
viennacalling Posted December 10, 2011 Share Posted December 10, 2011 (edited) The Result Text is what the player should see when they click on the entry, for example "Your 10mm has been sorted!" The script should go in the Item Result Script box. I want to also this put out there and hopefully someone can confirm or correct me: I don't think you can declare a variable in the Item Result Script. The Geck won't complain but I don't think it'll actually do anything. Try making AmmoCount a global and take the declaration out of the script. Edited December 10, 2011 by viennacalling Link to comment Share on other sites More sharing options...
DieHard3303 Posted December 10, 2011 Author Share Posted December 10, 2011 The Result Text is what the player should see when they click on the entry, for example "Your 10mm has been sorted!" The script should go in the Item Result Script box. I want to also this put out there and hopefully someone can confirm or correct me: I don't think you can declare a variable in the Item Result Script. The Geck won't complain but I don't think it'll actually do anything. Try making AmmoCount a global and take the declaration out of the script. Okay I will give that a try and thank you for your help, I will post if successful or not. Link to comment Share on other sites More sharing options...
DieHard3303 Posted December 10, 2011 Author Share Posted December 10, 2011 Okay I made the Global var (s) and tried the terminal and again no go. I deleted the terminal and created a new one changed the script to a if test and tried it again no go. I tried the two scripts that I have completed one for the ammo and one for the workbench parts both are enjoying the same boat ride. One question I know is prob meaningless does the server choice mean anything or just a visual? ( server 1 - etc ) I don't know where to go from here as there is no way to debug the script to find the error point., or anyway that I know of, ran the script thru the validator and it was fine except for the var declaration which is a global. If anyone wants to take a closer look at the problem just pm me and I will email the esp. Thanks again Link to comment Share on other sites More sharing options...
rickerhk Posted December 10, 2011 Share Posted December 10, 2011 I entered the name 1DD10mmAmmoREF in the reference editor id input box for the container and changed the script to this: Never use a Ref name that begins with a number. The script compiler will mistake it for a formID. And try to avoid naming new objects with numbers in front of them, just as a best practice. Link to comment Share on other sites More sharing options...
DieHard3303 Posted December 10, 2011 Author Share Posted December 10, 2011 Appreciate that I just read the same thing on Cipscis site. Thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts