Glenstorm Posted February 13, 2011 Share Posted February 13, 2011 Hi. GECK wont let me save this script (keeps asking whether to save or not, and on confirmation does nothing and this goes on and on and on) and this usually points at a syntax error in the script. This is a simple script i wrote to test something ScriptName asBinocularScript float a;float b;int enable; BEGIN onLoad set a to 10; set b to 5;END BEGIN onFire set enable to 1;END BEGIN GameMode if enable == 1 set enable to 0; endifEND I dont get why this throws an error. Am I missing something fundamental? Thanks in advance Link to comment Share on other sites More sharing options...
WastelandAssassin Posted February 13, 2011 Share Posted February 13, 2011 (edited) nevermind......saw it a second later...... what problems do the GECK tells you that this script has?? Edited February 13, 2011 by WastelandAssassin Link to comment Share on other sites More sharing options...
Glenstorm Posted February 13, 2011 Author Share Posted February 13, 2011 (edited) nevermind......saw it a second later...... what problems do the GECK tells you that this script has?? Does it say anything? Usually I figure out something is wrong with the script when I try to save it and then when closing it, It asks me whether I want to save it (regardless). I'm not aware of a build output or an error console or something like that but if there is, I would really appreciate it if you could point it out to me. And there is another thing When I try to print out the values of a and b through a message box in the game, both show up as 0.00 but a = 10 and b = 5 as initialised. Anyone know why? Edited February 13, 2011 by Glenstorm Link to comment Share on other sites More sharing options...
Pelinor Posted February 13, 2011 Share Posted February 13, 2011 The GECK PowerUp for New Vegas fixes the missing script compiler warnings, among other things. With that, you'll see that "enable" is an invalid variable name--it's a function name. Link to comment Share on other sites More sharing options...
WastelandAssassin Posted February 13, 2011 Share Posted February 13, 2011 when you try to save a script with mistakes, it pops up a box that says that there is a problem in a specific line, and tries to describe the problemif you don't see such a thing, then maybe the script itself is written properly are you sure that an OnLoad script can work on a weapon??maybe if you throw it on the ground it will work??or you could try switching this to an OnEquip block?? Link to comment Share on other sites More sharing options...
Glenstorm Posted February 13, 2011 Author Share Posted February 13, 2011 when you try to save a script with mistakes, it pops up a box that says that there is a problem in a specific line, and tries to describe the problemif you don't see such a thing, then maybe the script itself is written properly are you sure that an OnLoad script can work on a weapon??maybe if you throw it on the ground it will work??or you could try switching this to an OnEquip block?? It was the OnEquip block. Works like a charm now. Will be publishing after polishing up a bit. Link to comment Share on other sites More sharing options...
WastelandAssassin Posted February 13, 2011 Share Posted February 13, 2011 so that was really the problem??and changing the OnLoad to OnEquip solved it??wow, that was a shot in the dark..... but hey, i'm glad you got it working now, forgive me if this sounds rude (i don't intend it to), but what is the whole idea of the script??i mean, what was it supposed to do exactly?? Link to comment Share on other sites More sharing options...
Glenstorm Posted February 13, 2011 Author Share Posted February 13, 2011 (edited) so that was really the problem??and changing the OnLoad to OnEquip solved it??wow, that was a shot in the dark..... but hey, i'm glad you got it working now, forgive me if this sounds rude (i don't intend it to), but what is the whole idea of the script??i mean, what was it supposed to do exactly?? LOL, I just made that up (though it showed the problem I had with the real thing, also I managed to forget to change the scriptname to something general). I didn't want to show anything about what I intend to make, because frankly, I'm afraid I might not be able to deliver. But I'm fairly sure about this one. Hell, if it comes out as I want it to be, I'll post the link here. And I forgot to thank you. Thanks a lot! Edited February 14, 2011 by Glenstorm Link to comment Share on other sites More sharing options...
Recommended Posts