theoneandonlyboiler Posted August 4, 2012 Posted August 4, 2012 Hi I edited a script from a mod that adds some perks based on experience. I just added one more perk. I also created a message to show the player if the perk was added. The part for the additional perk looks exactly like all the others, except off course the data that relates to the perk and message. The same goes for the message, exactly the same as the others. As far as I see it, everything should be working, but it isn't! When i try to save the script i always get the following error:"Too few variables in MessageBox parameters; expected1, found 0." What the hell does that mean? The error refers to the line in the Script where i have defined what message should be displayed. But the line looks exactly the same as the lines for the other 8 perks that were originally in the script. And there is no list of variables in the script, so that can't be the problem either. So, any ideas?
Ladez Posted August 4, 2012 Posted August 4, 2012 I'm guessing you have a percent sign in that message, yes? To do that you have to put in two percent signs, right next to each other, like this "%%" without the quotes. This is because a single percent sign is used to insert variables to the message, which will increase the number of parameters you need to specify when calling the ShowMessage function. And that explains the error message you get. Take a look at the page for ShowMessage at the GECK Wiki, it goes into further detail :)
theoneandonlyboiler Posted August 4, 2012 Author Posted August 4, 2012 @ Ladez Thanks! That solved it :)
Ranius7 Posted November 22, 2013 Posted November 22, 2013 Same problem here and it was the damn percent indeed. Thanks!
grigoriprime Posted May 5, 2014 Posted May 5, 2014 On 8/4/2012 at 2:28 PM, Ladez said: I'm guessing you have a percent sign in that message, yes? To do that you have to put in two percent signs, right next to each other, like this "%%" without the quotes. This is because a single percent sign is used to insert variables to the message, which will increase the number of parameters you need to specify when calling the ShowMessage function. And that explains the error message you get. Take a look at the page for ShowMessage at the GECK Wiki, it goes into further detail :smile:Today, you are responsible for the Internet immediately and entirely answering a question that was driving me mad. My hat's off to you. THANKS!
puffer10 Posted September 3, 2014 Posted September 3, 2014 (edited) nevermind fixed my issue :) Edited December 30, 2014 by puffer10
Recommended Posts