Homer Tipton Posted July 16, 2009 Share Posted July 16, 2009 Hello I Have a script to display weapons in a custom gun cabnet, but the script will not work. The error is "line 5, 1903SRef.enable not found". Here is the script: scn GunCabnitDisplayScript Begin GameMode if (GunCabnitRef.GetItemCount CustomWeapon > 0) 1903SRef.enableelseif (GunCabnitRef.GetItemCount CustomWeapon == 1) 1903SRef.desableendif END I made the Gun Cabnit and the fake Weapon, then placed them with the GECK, placed the fake weapon to initially disabled, and then checked them in the game. By varrying the enabel disable button (initially disable on or off) with the GECK I can make them appear and disapear in the game. I assigned the Gun Cabnit the Editor ID Reference of GunCabnitRef and the Weapon the Editor Reference ID 1903SRef. However evertime I attempt to save the script the above error comes up. What is going wrong? Help please. Ersul Link to comment Share on other sites More sharing options...
Cipscis Posted July 16, 2009 Share Posted July 16, 2009 EditorIDs should never start with a number. If they do, then I believe the compiler will assume that they are a hexadecimal FormID, and therefore won't find the EditorID. If you change the EditorRefID so that it doesn't start with a number, that should fix your error. P.S. Please indent your scripts and place them into "code" tags, or "codebox" tags for longer code. If you don't know how to indent your scripts, here is a tool that can do it for you while checking for several structural errors - Script Validator Cipscis Link to comment Share on other sites More sharing options...
Recommended Posts