bahamutskingdom Posted June 26, 2015 Share Posted June 26, 2015 (edited) I just finished creating a new town the player builds at Fort Firemoth. I thought it would be cool to have as part of your reward, a weekly salary of 150 from the new mine.When I got that far into the quest, and met the person to pay me I got this:Script Error: EXPRESSION in FM_Paid FM_Paid is the title of the script itself. I have never had an error go to the actual script. Usually it has to do with an object it is attached to or something of that nature. Also mistypings in the script itself. Neither of these apply as far as I know. (Typing is good)Here is the script: begin FM_Paid short daysPassedshort myDay if ( daysPassed == 0 )set myDay to Dayset daysPassed to 1endif if ( myDay != Day )set myDay to Dayset daysPassed to daysPassed +1 )endif if ( daysPassed > 7 )set Firemoth_Money to 1MessageBox "Blah blah blah"set daysPassed to 0endif end The global is Firemoth_Money. It is set to short, with a value of 0.The script is not attached to anyone/anything, though it is supposed to StartScript "FM_Paid" via the greeting box.I also have it AddTopic "weekly payment" just because my topics like to disappear from time to time. I am stumped....can anyone tell me where or what the error is meaning? Edited June 26, 2015 by bahamutskingdom Link to comment Share on other sites More sharing options...
MotoSxorpio Posted June 26, 2015 Share Posted June 26, 2015 You didn't define "day" in if ( myDay != Day ) Link to comment Share on other sites More sharing options...
MotoSxorpio Posted June 26, 2015 Share Posted June 26, 2015 What I mean is..."DAY" is what...a global? a float? Link to comment Share on other sites More sharing options...
bahamutskingdom Posted June 26, 2015 Author Share Posted June 26, 2015 What I mean is..."DAY" is what...a global? a float? Day is a global from the vanilla content.I know it is used, as is daysPassed in making the strongholds. This script is actually partly derived from that script. Link to comment Share on other sites More sharing options...
hollaajith Posted June 26, 2015 Share Posted June 26, 2015 There is mismatched parantheses in your script, which the CS won't catch sometime ad the game sometimes catches. Its better to do scripting MWEdit. It says its in beta, but scripting is good in there with its color coded sytax and superior error checking. Also, you don't have to declare "dayspassed", since its a global. Link to comment Share on other sites More sharing options...
Recommended Posts