Jump to content

Need assistance to compile .psc script


Recommended Posts

Posted

Not seeing anything wrong here, so gonna say that the issue actually comes from one of the argument names. One thing that really confuses the crap out of Papyrus is when you have a script named for example Timeout.psc and then you have a function in another file like:

 

function NewThread(float TimeOut = 30.0)

 

It's going to read that as: NewThread(<type> <type> = 30.0) instead of NewThread(<type> <identifier> = 30.0). So check for scripts named: Timeout, LocX, LocY, LocZ, RotX, RotY, RotZ and resync.

Posted (edited)
17 minutes ago, traison said:

Not seeing anything wrong here, so gonna say that the issue actually comes from one of the argument names. One thing that really confuses the crap out of Papyrus is when you have a script named for example Timeout.psc and then you have a function in another file like:

 

function NewThread(float TimeOut = 30.0)

 

It's going to read that as: NewThread(<type> <type> = 30.0) instead of NewThread(<type> <identifier> = 30.0). So check for scripts named: Timeout, LocX, LocY, LocZ, RotX, RotY, RotZ and resync.

 

Well, search gives nothing, screenshots on how I done searching:

 

Spoiler

2024-08-03171224.png.2a67c2950fd558d516c9f4921edff520.png2024-08-03171307.png.28f90e809c5035a5efcda50a13ac5550.png2024-08-03171429.png.a7e81ed23848d68d874d2f38be598b3c.png2024-08-03171152.png.88b036b6a6c6d479eb0bb8359f40c01f.png

 

Edited by Colossus228
typo
Posted

How about you try compiling sslThreadController.psc?

 

Otherwise kind of out of ideas here. If you're up for a RustDesk session I'll come have a look. Just make sure you understand what that entails before you agree to anything.

Posted (edited)

While the issue is not fixed, we did find a workaround. We renamed the offending functions to CenterOnCoords2 and NewThread2. Removed their default parameters and created proxy functions with the original function names and default values. These proxy functions are only in the empty states of the scripts and they only call their *2 variants.

 

Example:

sslThreadModel function NewThread(float TimeOut = 30.0) ; This is in the empty state
	return NewThread2(TimeOut)
endFunction

*elsewhere*
sslThreadModel function NewThread2(float TimeOut) ; This was ONE OF the original NewThread functions
	; Claim an available thread
	return ThreadSlots.PickModel(TimeOut)
endFunction

 

For some odd reason the script wouldn't compile with 2 identical functions (one in the empty state and one in another state) while they had a float variable with a default value in them. An int with a default was fine. No default was fine. Changing the variable name didn't fix it. Changing the function name didn't fix it. We checked to make sure the "." was actually a latin dot. We tried 2 papyrus compilers from 2 vastly different CK versions (just in case there was version differences).

 

Edit: Having only one function in the empty state with float arguments and default values is perfectly fine. Hence the proxy function idea. This really smells like a compiler bug, perhaps has something to do with the regional settings of Colossus228.

 

Edit again: If you know a proper fix to this, please post.

Edited by traison
  • 1 year later...
Posted

I am deeply sorry for necroing, but for people seeking the answer:

On 4/14/2023 at 7:47 PM, adarkman said:

For any people with this problem:

Set "Regional Standards" in Control Panel to "English (USA)" then restart MO2/CK/Script Compiler.
Voila - compilation successful.

Posted
48 minutes ago, D_Logeka said:

Set "Regional Standards" in Control Panel...

 

Seems like past me was correct too then. Seems odd that floats elsewhere are fine, and that it's just having issues with floats in such a specific way. Definitely smells like a bug in the compiler.

 

I wonder how much work it would be to fool the compiler into thinking the OS region is en-US. Having to switch it back and forth for every compile session seems like it would be quite annoying.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...