d100_number not found in whitelist?

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

d100_number not found in whitelist?

Post by Cmdr James »

Does anyone know why I might be seeing this in my log

Code: Select all

[script.unpermittedMethod] ClassifyLHSConditionSelector (OOLegacyScriptWhitelist.m:367): ***** SCRIPT ERROR: in ship "Terrapin" legacy actions, method '[d100_number]' not allowed. In a future version of Oolite, this method will be removed from the handler. If you believe the handler should allow this method, please report it to [email protected].
[script.sanitize.unclassifiedSelector] ClassifyLHSConditionSelector (OOLegacyScriptWhitelist.m:379): ***** ERROR: Whitelisted query method '[d100_number]' has no type suffix, treating as invalid.
If I look in whitelist.plist, it is there

Code: Select all

<snip>
"commanderLegalStatus_string",
"d100_number",
"pseudoFixedD100_number",
<snip>
and unless I am completely misreading OOLegacyWhiteList.m, it does have a suffix of _number.

Is it something silly like someone has put square brackets around it in a script somewhere?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Is it something silly like someone has put square brackets around it in a script somewhere?
I assume it. Still strange. I remembered the name "Terrapin" so I looked in my ships and found it. However in its death_actions I found:

Code: Select all

spawn: qbomb 1 (0.1)
No d100_number but another wrong code. Maybe the (0.1) was mend as chance factor and in a later release d100_number was used. Best proof is of cause to look in your current Terrapin ship script.

Cargo_Wreck_Teaser used intensive d100_number and [d100_number] in its script_actions. When that does not give errors I suspect it is a syntax error in the Terrapin script. I start to like the new code already without having used it, because it points much faster to legacy script bugs that were long unnoticed.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Sorry, I should have said a few other things. I am flying a Terrapin. I hve searched (grep) the content of the terrapin oxp and not found d100_number at all.

I imagine that its a player specific script, not a ship specific one.

I do not get the error often, but it is possible that I hve had it a few times and not always noticed.

The thing thats odd, is, as Eric said, it is used quite a bit in various scripts, and I dont see d100_number errors in the logs for them
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

It is nothing to do with player scripts, I also get the error for Griff Kraits

Code: Select all

[script.unpermittedMethod] ClassifyLHSConditionSelector (OOLegacyScriptWhitelist.m:367): ***** SCRIPT ERROR: in ship "Griff Krait" legacy actions, method '[d100_number]' not allowed. In a future version of Oolite, this method will be removed from the handler. If you believe the handler should allow this method, please report it to [email protected].
[script.sanitize.unclassifiedSelector] ClassifyLHSConditionSelector (OOLegacyScriptWhitelist.m:379): ***** ERROR: Whitelisted query method '[d100_number]' has no type suffix, treating as invalid.
[script.unpermittedMethod] SanitizeCondition (OOLegacyScriptWhitelist.m:158): ***** SCRIPT ERROR: in ship "Griff Krait" legacy actions, method '[d100_number]' not allowed.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

'the has no type suffix' message is caused by having "d100_number" inside square brackets.

Looking at OOLegacyScriptWhitelist.m it seems to me that all your problems are caused by the brackets. Does the script work OK if you remove them leaving a 'naked' "d100_number" instead of "[d100_number]"?

To be on the safe side we might have to add a bracket remover to the whitelist parser...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

I think its a good idea to have the code remove brackets, as there are a few scripts which use them.
Post Reply