|
Celerra7 Novice
Joined: 28 Jan 2010 Posts: 34
|
Posted: Sun Dec 26, 2010 7:52 pm
Script Error when using blank #SHOW command inside #IF statement |
There seems to be an error in either the #SHOW command or the #IF command. In the following example, I am just trying to space out my info on the screen. I am receiving an error..
ERROR: Trigger "test_trigger" fired but did not compile
The following is the code for test_trigger. I am kicking it with a #say test_trigger to the session window.
Things I have tested:
1. If I remark out (use the semi-colon) the last active #SHOW command, the script works.
2. If I remark out the last active #SHOW command, and enable any other blank #SHOW command, the script fails.
3. If I remark out the last active #SHOW command, and enable any other non-blank #SHOW command, the script works.
I'm not sure what the correlation between the blank #SHOW commands and the mud command (equipment, inventory, etc.), but the first blank #SHOW command after the first mud command ALWAYS makes the script fail - if it is inside an #IF statement.
I can take the entire "else" portion of the #IF statement and run it on its own, fully enabled, and everything runs fine - spacing, mud commands, all #SHOW commands, everything.
Code: |
#WAIT 1000
#CLR
$pkgloaded = 1
#IF (NOT $pkgloaded)
{
#SHOW Char Package NOT Loaded - Disabling All Triggers
}
{
#SHOW
#SHOW Mud Command 1 - Equipment
#SHOW
equipment
#SHOW
;#SHOW Mud Command 2 - Inventory
;#SHOW
;inventory
;#SHOW
;#SHOW Mud Command 3 - Score
;#SHOW
;score
}
|
I can get around this error by using the #SAY command. Blank #SAY statements work perfectly throughout this script.
Thanks for any feedback.
-Celerra7
Win7, cMUD 3.33a |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Sun Dec 26, 2010 8:04 pm |
I just pasted that code and ran the syntax checker. The error is pretty explicit--#show requires an argument. You can't have a blank #show command.
|
|
|
|
Celerra7 Novice
Joined: 28 Jan 2010 Posts: 34
|
Posted: Sun Dec 26, 2010 9:09 pm |
Missed that one. I assumed, since the previous version 2.37 did not need a component to it, 3.33 doesn't. It also says in the documentation that SAY and SHOW are the same, except for how linefeeds are handled. Thanks for the heads up.
-Celerra7
Win7, cMUD 3.33 |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|