|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Fri Apr 03, 2009 3:58 pm
[3.05] Is is possible to flag this syntax error in the syntax checker? |
Often enough I accidentally put a space between the beginning of %if and its associated (), like this:
%if (1, true, false)
Instead of the correct way:
%if(1, true, false)
Could this be detected in the syntax checker? I know not to do it but it happens anyways often enough that it would be nice if it could catch that type of thing. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Apr 03, 2009 4:09 pm |
It's not actually a syntax error and compiles fine on my system here. Give me the full script that had a problem with this so I can look at it in more detail. But I just did:
Code: |
a = %if (1, true, false) |
and it worked properly. |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Fri Apr 03, 2009 4:46 pm |
Use this code and type 'test' to execute it.
Code: |
<alias name="test" id="58">
<value>$test_var = %if ( %null( %1), 1, %1)
#say $test_var</value>
</alias>
|
This gives: Parse Error: Error parsing command: Access violation at address 004061C7 in module 'cMUDPro.exe'. Read of address 0000010A: test
I also sent in the associated bug report via the reporting mechanism. I included a link to this topic in the 'How'd this happen' field. |
|
|
|
|
|
|
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
|
|