FutureVisions Posted November 24, 2010 Share Posted November 24, 2010 What's wrong with this script?I have one message (FVisionsEntryMessage02) that will give acess to 3 other messages (FVisionsMessage01, 02 and 03) on player choice.The entry message is a button choice message with 4 buttons : index 0 is the exit button, index 1 is the first message and buttons 2 and 3 correspond to the 2nd and 3rd messages.I already have a working script that is identical to this one. The only difference is that the entry message only gives 2 button choices. (0, 1 and 2) But in this case im getting an error on line 27 saying:" SCRIPTS: Script 'FVisionstScript', line 27:Too few variables in MessageBox parameters; expected 1, found 0. I have no idea what this means or why it works on my first 2 button script and not on this one. I have lready checked that all messages are created and that the entry message has all the 4 choice buttons.Here's a copy of the script. Any help will be appreciated. scn FVisionstScript short button short DoOnce short DoOnce2 short DoOnce3 begin OnActivate ShowMessage FVisionsEntryMessage02 set DoOnce to 0 set DoOnce2 to 0 set DoOnce3 to 0 End Begin GameMode set Button to GetButtonPressed if ( button == 1 ) && ( DoOnce == 0 ) ShowMessage FVisionsMessage01 set DoOnce to 1 ShowMessage FVisionsEntryMessage02 endif if ( button == 2 ) && ( DoOnce2 == 0 ) ShowMessage FVisionsMessage02 ; This is the line where I'm getting the error set DoOnce2 to 1 ShowMessage FVisionsEntryMessage02 endif if ( button == 3 ) && ( DoOnce3 == 0 ) ShowMessage FVisionsMessage3 set DoOnce3 to 1 ShowMessage FVisionsEntryMessage02 endif end Link to comment Share on other sites More sharing options...
Ez0n3 Posted November 25, 2010 Share Posted November 25, 2010 Does the message "FVisionsMessage02" have a variable in the message text (IE: "%.0f")? Then ShowMessage would need additional variables passed to it.ShowMessage FVisionsMessage02, fVariable01 Link to comment Share on other sites More sharing options...
FutureVisions Posted November 25, 2010 Author Share Posted November 25, 2010 (edited) Nop. The 2nd button in the entry mesage is called "Biology", don't know if that messes it, I had already tried to change that button's name because of that but the problem still happens. Apparently the problem was in fact a percent value in the 2nd message. That value is only related to the text itself, it would never have occured to me, lol just changed "15%" with "15 percent" and it saved. Thx a lot for the help :thumbsup: Edited November 25, 2010 by FutureVisions Link to comment Share on other sites More sharing options...
Ez0n3 Posted November 25, 2010 Share Posted November 25, 2010 (edited) Maybe try replacing "FVisionsMessage02" with "FVisionsMessage01" to see if it will compile. If it does, then the message is borked. Maybe try Here and Here. Edited November 25, 2010 by Ez0n3 Link to comment Share on other sites More sharing options...
Interfer0 Posted November 25, 2010 Share Posted November 25, 2010 Try using Elseif instead of endif after each if. I don't know if that is causing any issues though. Link to comment Share on other sites More sharing options...
FutureVisions Posted November 25, 2010 Author Share Posted November 25, 2010 Try using Elseif instead of endif after each if. I don't know if that is causing any issues though. Its already fixed like I said above. The problem was a "15%" value that was part of the 2nd message that the game was assuming to be a variable. I replaced it with "15 percent" and the script saved. But thx for the reply anyway Link to comment Share on other sites More sharing options...
thc1234 Posted November 25, 2010 Share Posted November 25, 2010 You can use %% to display % sign 8) Link to comment Share on other sites More sharing options...
Recommended Posts