Hi guys,

Using CF4.5 (the owners of the server have been promising an upgrade for
some time now, but no luck) and I've been having all sorts of trouble with
this function I'm trying to create. I'm not entirely certain what I'm doing
wrong, so here's all the relevant info. Hopefully someone can point out my
mistake.

Cheers,

Seona.
---------------
This is the code of the function:

function calcmod(score)
        {
                if (IsNumeric(score))
                {
                        if (score lte 1)
                        {
                                modifier="-5";
                                return modifier;
                        }
                        else if (score lte 3)
                        {
                                modifier="-4";
                                return modifier;
                        }
                        else if (score lte 5)
                        {
                                modifier="-3";
                                return modifier;
                        }
                        else if (score lte 7)
                        {
                                modifier="-2";
                                return modifier;
                        }
                        else if (score lte 9)
                        {
                                modifier="-1";
                                return modifier;
                        }
                        else if (score lte 11)
                        {
                                modifier="0";
                                return modifier;
                        }
                        else if (score lte 13)
                        {
                                modifier="+1";
                                return modifier;
                        }
                        else if (score lte 15)
                        {
                                modifier="+2";
                                return modifier;
                        }
                        else if (score lte 17)
                        {
                                modifier="+3";
                                return modifier;
                        }
                        else if (score lte 19)
                        {
                                modifier="+4";
                                return modifier;
                        }
                        else if (score lte 21)
                        {
                                modifier="+5";
                                return modifier;
                        }
                        else if (score lte 23)
                        {
                                modifier="+6";
                                return modifier;
                        }
                        else if (score lte 25)
                        {
                                modifier="+7";
                                return modifier;
                        }
                        else if (score lte 27)
                        {
                                modifier="+8";
                                return modifier;
                        }
                        else if (score lte 29)
                        {
                                modifier="+9";
                                return modifier;
                        }
                }
        }

---------------------------------------
This is an example of the code where I call the function (after
<cfinclude>ing the file with the function at the top of the page):

#calcmod(q_CharacterDetails.CharInt)#

---------------------------------------
This is the error I'm getting:

Error Diagnostic Information
Just in time compilation error

Invalid parser construct found on line 77 at position 11. ColdFusion was
looking at the following text:

calcmod
Invalid expression format. The usual cause is an error in the expression
structure.
The last successfully parsed CFML construct was a CFSCRIPT tag occupying
document position (1:1) to (1:10).

The specific sequence of files included or processed is:
D:\NEIGHBOURHOOD_INTERNET\MEMBERS\15MB\GALANEMPIRE.COM\CHARACTER.CFM

D:\NEIGHBOURHOOD_INTERNET\MEMBERS\15MB\GALANEMPIRE.COM\CUSTOMTAGS\CHARACTERF
UNCTIONS.CFM      CFInclude

The error occurred while processing an element with a general identifier of
(CFINCLUDE), occupying document position (3:1) to (3:56).


Date/Time: 08/19/03 01:42:27
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Remote Address: 203.173.165.29
HTTP Referer: http://www.galanempire.com/index.cfm?message=welcome

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to