IslandzVW / halcyon

InWorldz Halcyon 3d virtual reality world simulator
BSD 3-Clause "New" or "Revised" License
21 stars 26 forks source link

Error on Scripts in GridMode #428

Closed WhiteCoreWebUI closed 6 years ago

WhiteCoreWebUI commented 6 years ago

Ok so i was figuring the last 2 days out to get this running, ins standalon the script here: http://wiki.inworldz.com/izwiki/index.php/Premade_Vehicle_Scripts worked perfectly, in gridmode however i keep getting the message about "mismatched input ',' expected NEWLINE and that goes on for every script. any solution to that? OS is Windows 7 Ultimate 64bit for Halcyon.exe, Debian 9 for whip,and the grid servers (user grid and messaging)

appurist commented 6 years ago

That sounds like your gridmode setup might not have Phlox specified as the script engine. It's pretty clear that the difference here is that there is a configuration setting in your standalone setup that is missing from your gridmode setup (or vice versa).

Try side-by-side file comparisons of the two, and try some simple example scripts, like one that just has a llSay in it, to see if there's a general problem there. If that works, try an example script that calls a Halcyon-specific function, such as one of the functions here.

All of the regions in InWorldz run in grid mode, so there's nothing specific about that, or the vehicle scripts, that are likely to be causing trouble here. More likely the difference between the standalone and gridmode configuration files.

Are you switching from standalone to grid by changing files in the same folder, or do you have separate folders? If separate folders, you might just be missing some DLLs or something of that nature. But again, check the Halcyon.ini configuration and any other settings you change to go from standalone to gridmode.

WhiteCoreWebUI commented 6 years ago

i only changed the .ini to gridmode=true all other settings remained the same

WhiteCoreWebUI commented 6 years ago

also i noticed there is no setting in the .ini to specify the script engine

http://wiki.inworldz.com/izwiki/index.php/IwGetAgentData this script works fine, but the vehicle script, my AO script and Some Dance scripts throw the newline error and i noticed Phlox does trigger when saving the script it looks like this then : phlox

appurist commented 6 years ago

There's more to configuring a grid for gridmode than just changing it to true in the Halcyon.ini. However, if you're getting things started, logged in and editing scripts, you presumably have enough configured and are probably running the required components (User first, then Grid, then Messaging, then Aperture, then the regions).

Also, we can see from the error in the screenshot above that it is using the Phlox engine.

Are you using the InWorldz viewer to enter the scripts, or something special such as the script preprocessor in Firestorm? If you can reproduce the error in the InWorldz viewer, please include the full source for any script that fails to compile, so we can give it a spin here. I know it seems like it's any script (and perhaps is), but the next step is to verify that it's not a problem with the process of getting the script into the script editor, such as pasting from a web browser with extra content or a different character set, etc. Something is clearly wrong with either the region server configuration or the scripts themselves.

So please copy one that does not compile from an in-world object's script Edit window into a this issue report for us to try to reproduce the error. Thanks

WhiteCoreWebUI commented 6 years ago

I just tried with the inworldz viewer, which is throwing the same error , for the moment i am only trying with the vehicle script mentioned as i was sure this one worked before

appurist commented 6 years ago

That would imply there is something wrong with the way the scripts are being pasted into the edit window, or some other similar problem.

Do you get the same error in InWorldz, such as on the InWorldz Sandbox 1 through 6 regions? I can probably give you a very quick answer if I can see one. If you have a simple prim object with a script in it that does not compile, please send one to me in-world to Jim InWorldz.

If you can only reproduce it on your grid instance, then please open the script that does not compile, Select All, and paste it in here or on pastebin.com. Thanks.

appurist commented 6 years ago

"mismatched input ',' expected NEWLINE This error gives me a couple of other ideas about what might be the problem here...

Is there any chance that your script starts with a comma at the top?

Is the Windows installation a VM, e.g. running in VirtualBox or something similar? Are you copying and pasting the script from the Linux side (CR/LF vs LF problem)?

WhiteCoreWebUI commented 6 years ago

error i just created and account for inworldz but i do not seem able to login whatever i do, to the answers i use on my home machine windows 7 too i paste the scripts directly from there and it doesnt matter what is in the line be it a comment a list integer or float alsowas newline error and always on the same line, by the vehicle script it is always line 61 no matter what is standing there

--edit--- The Grid Services run on a physical machine and the Regions in a KVM VM

WhiteCoreWebUI commented 6 years ago

``// Generic physical vehicle // 2014, Balpien Hammerer // Licensed under Creative Commons CC-BY 4.0

// NOTE: Read through and adjust the customization choices. // ====================================================================================== //

// Turning on debugging will cause various messages to be sent to you (the owner) to help // you with your development. LeaveDebug FALSE in your production vehickes. integer Debug = FALSE;

// When OwnerOnly is set to TRUE, only the owner of the vehicle can ride it. // When OwnerOnly is set to FALSE, then anyone can ride the vehicle. // // WARNING: if you decide to sell a vehicle as COPY but you let anyone ride the // vehicle, you will have just given away your vehicle forever because one person can then // rez a fleet of the one vehicle and create a very nice rental business for themselves. // integer OwnerOnly = TRUE;

// Choose one of the vehicle types by uncommenting one of the following types. When a // vehicle type is set, the system also sets the default parameters for that type. // (remove one of the '//'): // integer VehicleType = //VEHICLE_TYPE_SLED; //VEHICLE_TYPE_CAR; //VEHICLE_TYPE_MOTORCYCLE; //VEHICLE_TYPE_BOAT; //VEHICLE_TYPE_SAILBOAT; VEHICLE_TYPE_AIRPLANE; //VEHICLE_TYPE_BALLOON;

// There are several common input controls settings for vehicles and the method chosen depends // on what you wish to achieve. // Method 0 (no controls) is for free moving vehicles, often used in sleds, // free flying balloons or self-guided vehicles. The avatar cannot steer the vehicle. // // Method 1 is often used in land and powered seagoing vehicles. It has basic forward/back, // turn left/right and speed based on gears (speed ranges). // // Method 2 is used in hybrid land, sea, air vehicles. It has the basic forward/back, // turn left/right and hover up/down controls. Also has strafing (side-to-side movement). // // Method 3 is often used in aircraft. It has pitch up/down, bank left/right, and // throttle up/down controls.

// Method 0: No input controls.

// Method 1: A or left-arrow to turn left // D or right-arrow to turn right // W or up-arrow to move forward faster // S or down-arrow to move forwrd slower or backward // E or PgUp to gear up (higher top speed) // C or PgDn to gear down (lower top speed)

// Method 2: A or left-arrow to turn left // D or right-arrow to turn right // shift-A or shift-left-arrow to strafe left // shift-D or shift-right-arrow to strafe right // W or up-arrow to move forward faster // S or down-arrow to move forward slower or backward // E or PgUp to gain altitude // C or PgDn to lose altitude

// Method 3: A or left-arrow to bank left // D or right-arrow to bank right // W or up-arrow to pitch downward // S or down-arrow to pitch upward // E or PgUp to increase speed // C or PgDn to decrease speed integer InputMethod = 1;

// The all-stop feature is very useful to people who wish to stop a vehicle immediately. // It also is good for newcomers to virtual vehicles, reduces frustration. When enabled, // pressing either W,S together or up/dn arrow keys together will stop the motors. integer AllStop = TRUE;

// The follow parameters determine how quickly your vhicle moves in its various linear axes. // These speeds are in meters per second. // Adjust to your needs:

// MaxFwdSpeed is the fastest speed the forward motor will go. float MaxFwdSpeed = 30.0;

// The increment is the amount to add every control event when speeding up. // The dreent is the amount of speed to remove every control event when slowing down. float IncrementFwd = 0.2; float DecrementFwd = 0.3;

// If Method 1 was chosen, these are the speeds for each gear. You can add more speeds or fewer. // Up to you :) list Gears = [MaxFwdSpeed0.2, MaxFwdSpeed0.4, MaxFwdSpeed0.6, MaxFwdSpeed0.7, MaxFwdSpeed];

// MaxRevSpeed is the fastest spped the reverse motor will go (often much lower than the forward speed). float MaxRevSpeed = -5.0;

// MaxSideSpeed is the fastest that the strafing (side-to-side) otors will go. float MaxSideSpeed = 3.0;

// MaxVertSpeed is the fastest speed for up/down motors. float MaxVertSpeed = 6.0;

// The following parameters determine how quickly your vehicle rotates along the angular axes. // These speeds are best expressed in radians per second where, for example, // PI is one complete turn in two seconds. // Adjust to your needs:

// Minimum turing speed ratio (0.0 to 1.0) float MinTurnRatio = 0.4;

// Maximum left/right turning speed. float MaxYawSpeed = PI/2;

// Maximum pitch (nose up/down) turning speed. float MaxPitchSpeed = PI/4;

// Maximum banking speed. float MaxBankSpeed = PI/2;

// Enable auto buoyancy for airplanes by setting it to nonzero. it simulates wing lift. float AutoBuoyancy = 0;

// Sit target. You can set the sit target here if the avatar is to sit on the root prim // of the vehicle. If the vehicle is large, you often want to sit the driver on a child prim // and provide a sit script to do that. In that situation, set the SitPosition and vector // to ZERO_VECTOR. //vector SitPosition = ZERO_VECTOR; //vector SitRotation = ZERO_VECTOR; vector SitPosition = <0.0, 0.0, 0.5>; vector SitRotation = ZERO_VECTOR;

// These settings are for the basic dynamic camera. // Set them all to 0.0 if you do not want a dynamic camera. float CameraPitch = 24.0; float CameraDistance = 2.7; float CameraLag = 0.2;

// Advanced special sauce. This is where you customize the behavior of the vehicle. // The default settings work for most cases, but if you need tighter friction, zippier // banking, etc., this is where you add the vehicle parameters. // The vehicle type is passed to this function in case you have a hybrid vehicle that // changes its type on the fly. You can then set the parameters based on the type. // SetAdvancedVehicleParameters(integer vtype) { // The code here is an example for a multi-use vehicle system. Parameters have been chosen // to work best for each vehicle type. // /**/ if (vtype == VEHICLE_TYPE_CAR) { llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_TIMESCALE,<0.1, 0.3, 1000.0>); llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE,<20.0, 0.3, 0.3>); llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_TIMESCALE,<0.3, 0., 0.1>); llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE,<0.1, 0.1, 0.1>); MaxFwdSpeed = 30.0; MaxYawSpeed = PI/2; MaxBankSpeed = PI/2; InputMethod = 1; AutoBuoyancy = 0; }

else if (vtype == VEHICLE_TYPE_BOAT)
{
    // This is a power boat with active z-turning and some banking.
    MaxFwdSpeed = 8.0;
    MaxYawSpeed = PI/4;
    MaxBankSpeed = PI;
    InputMethod = 2;
    AutoBuoyancy = 0;
}

else if (vtype == VEHICLE_TYPE_AIRPLANE)
{
    llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_TIMESCALE,<0.1, 0.3, 0.3>);
    llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE,<20.0, 0.3, 0.3>);
    llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_TIMESCALE,<0.1, 0.1, 0.1>);
    llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE,<0.01, 0.01, 1.0>);
    llSetVehicleVectorParam(VEHICLE_ANGULAR_FRICTION_TIMESCALE,<0.1, 0.1, 0.3>);
    llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 0.5);
    llSetVehicleFloatParam(VEHICLE_BANKING_TIMESCALE, 0.2);
    llSetVehicleFloatParam(VEHICLE_INVERTED_BANKING_MODIFIER, -0.75);
    MaxFwdSpeed = 40.0;
    MaxYawSpeed = 0;
    MaxBankSpeed = PI/2;
    MaxPitchSpeed = PI/2;
    InputMethod = 3;
    AutoBuoyancy = MaxFwdSpeed * 0.5;
    llSetTimerEvent(1.0);
}

else if (vtype == VEHICLE_TYPE_BALLOON)
{
    // Balloons and airships are slow. For controllability, the z-motor decay is low.
    llSetVehicleFloatParam(VEHICLE_HOVER_TIMESCALE, 1000);
    llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE,<1.0, 1.0, 0.1>);
    MaxFwdSpeed = 5.0;
    MaxYawSpeed = PI/16;
    MaxBankSpeed = PI/16;
    InputMethod = 2;
    AutoBuoyancy = 0;

    // Note also balloons are pushed by the winds. Tis can be turned off by uncommenting this:
    // llSetVehicleVectorParam(VEHICLE_LINEAR_WIND_EFFICIENCY, <0,0,0>);
}

}

// // ======================================================================================

SetCameraParams() { if (llGetPermissions() & PERMISSION_CONTROL_CAMERA) { if (CameraPitch != 0 || CameraDistance != 0 || CameraLag != 0) { // These parameters keeps the camera close in on slow movement but backs off // when traqvelling quickly. What this does is make steering vastly easier during // high speed runs. llSetCameraParams( [CAMERA_ACTIVE, TRUE, CAMERA_FOCUS_LOCKED, FALSE, CAMERA_FOCUS_THRESHOLD, 0.3, CAMERA_FOCUS_OFFSET, <0.0, 0.0, 0.5>, CAMERA_PITCH, CameraPitch, CAMERA_DISTANCE, CameraDistance, CAMERA_BEHINDNESS_ANGLE, 0.6, CAMERA_POSITION_THRESHOLD, 0.2, CAMERA_POSITION_LAG, CameraLag]); }

    else
    {
        llClearCameraParams();
    }
}

}

Engage(key id) { // Someone got on if (id != NULL_KEY) { // If the driver is already sitting, ignore any other // sits if (SittingAgent != NULL_KEY) return;

    // OwnerOnly determines if anyone can ride the vehicle or solely the owner.
    if (!OwnerOnly || id == llGetOwner())
    {
        // Request desired permissions. Controls are requested only when
        // a movement method is chosen.
        integer desiredperms = PERMISSION_CONTROL_CAMERA;
        if (InputMethod != 0) desiredperms += PERMISSION_TAKE_CONTROLS;
        llRequestPermissions(id, desiredperms);

        // Notify FX scripts the vehicle has been engaged (started).
        llMessageLinked(LINK_SET, TRUE, "engage", id);

        SittingAgent = id;
    }
    else
    {
        // Unseat the person, notify them they are not the vehicle's owner.
        llMessageLinked(LINK_SET, FALSE, "engaged", id);
        llInstantMessage(id, "You are not the owner.");
        llUnSit(id);
    }
}

// Got off
else
{
    // If the vehicle has multiple riders, only respond to the
    // driver getting off.
    if (SittingAgent == NULL_KEY) return;
    SittingAgent = NULL_KEY;

    llSetStatus(STATUS_PHYSICS, FALSE);
    llReleaseControls();
    llClearCameraParams();

    // Work around an IW bug where permissions are not revoked when
    // an avatar stands;
    llRequestPermissions(llGetOwner(), 0);

    //Notify FX scripts the vehicle has been disengaged (stopped).
    llMessageLinked(LINK_SET, FALSE, "engage", id);
}

}

// Handle a request to speed up vector MotorFwdFaster(vector localvel) { // Stop jack rabbit motors by testing the local velocity against the // desired speed. If there is a large discrepency throttle back. if (llFabs(localvel.x) < 0.01) CurrentSpeed = 0;

// For low friction vehicles, monitor the speed difference closely.
if (VehicleType == VEHICLE_TYPE_AIRPLANE || VehicleType == VEHICLE_TYPE_BALLOON ||
    VehicleType == VEHICLE_TYPE_BOAT || VehicleType == VEHICLE_TYPE_SAILBOAT)
{
    if (localvel.x < CurrentSpeed * 0.8) CurrentSpeed = localvel.x;
}

if (CurrentSpeed < 0) CurrentSpeed = 0;

float   TopSpeed = MaxFwdSpeed;

// Use gears if method 1
if (InputMethod == 1)
{
    TopSpeed = llList2Float(Gears, CurrentGear);
}

CurrentSpeed += IncrementFwd;
if (CurrentSpeed > TopSpeed) CurrentSpeed = TopSpeed;

if (Debug) llOwnerSay("lvel=" + (string)localvel + " cspd=" + (string)CurrentSpeed);

return <CurrentSpeed, 0, 0>;

}

// Handle a request to slow down vector MotorFwdSlower(vector localvel) { // In going slower it is possible to go into reverse. // If you do not want reverse to happen, set the reverse speed to zero. if (llFabs(localvel.x) < 0.01) CurrentSpeed = 0;

CurrentSpeed -= DecrementFwd;
if (CurrentSpeed < MaxRevSpeed) CurrentSpeed = MaxRevSpeed;

if (Debug) llOwnerSay("lvel=" + (string)localvel + " cspd=" + (string)CurrentSpeed);

return <CurrentSpeed, 0, 0>;

}

// Internal variables - no touch. integer CurrentGear = 0; float CurrentSpeed = 0; float Debounce; key SittingAgent = NULL_KEY;

default { state_entry() { llSetStatus(STATUS_PHYSICS, FALSE); llSetVehicleType(VEHICLE_TYPE_NONE);

    // Set a sit target only if specified
    if (SitPosition != ZERO_VECTOR)
    {
        llSitTarget(SitPosition, llEuler2Rot(SitRotation));
    }
    else
    {
        // llSitTarget(ZERO_VECTOR, ZERO_ROTATION);
    }

    // Notify FX scripts the vehicle is stopped.
    llMessageLinked(LINK_SET, FALSE, "engage", NULL_KEY);

    // Unsit the avatar (this also works around an IW controls bug).
    llUnSit(llAvatarOnSitTarget());
}

on_rez(integer start)
{
    // Work around some IW properties bugs.
    llStopMoveToTarget();
    llStopLookAt();
    llStopHover();
    llSetVehicleType(VEHICLE_TYPE_NONE);
    llRequestPermissions(llGetOwner(), 0);

    // Make your vehicle temp then save to inventory to permit rezzing it in a scenic.
    // Upon rezzing this attenpts to make it non-temp (works in full regions), 
    // but it remains remains temp in scenics.
    llSetPrimitiveParams([PRIM_TEMP_ON_REZ, FALSE]);
}

changed(integer chg)
{
    if (chg & CHANGED_LINK)
    {
        // If a sit target is specified process it. Otherwise,
        // some other script is desingated to be the 'sitter', so do
        // not interfere with it.
        if (SitPosition != ZERO_VECTOR)
        {
            key     id  = llAvatarOnSitTarget();
            Engage(id);
        }
    }
}

run_time_permissions(integer perms)
{
    // Test each permission individually because permissions are not always bundled.
    //
    if (perms & PERMISSION_TAKE_CONTROLS)
    {
        // Take over all the movement related input controls.
        llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_ROT_LEFT | CONTROL_ROT_RIGHT | 
                       CONTROL_LEFT | CONTROL_RIGHT | CONTROL_UP | CONTROL_DOWN, TRUE, FALSE);

        // Make the vehicle physical and set the vehicle to the desired type.
        llSetStatus(STATUS_PHYSICS, TRUE);
        llSetVehicleType(VehicleType);

        // Advanced special sauce
        SetAdvancedVehicleParameters(VehicleType);
    }

    if (perms & PERMISSION_CONTROL_CAMERA)
    {
        // Take over the avatar's camera.
        SetCameraParams();
    }
}

control(key id, integer level, integer edge)
{
    float   nowtime   = llGetTime();
    integer mouselook = (llGetAgentInfo(id) & AGENT_MOUSELOOK) != 0;
    vector  vel       = llGetVel();
    vector  localvel  = vel / llGetRot();
    vector  angular;
    vector  linear;

    if (Debug) llOwnerSay("control method=" + (string)InputMethod + " lvl=" + (string)level + " edge=" + (string)edge);

    // Nothing to do if the input method is no controls.
    if (InputMethod == 0) return;

    // If all-stop keys are being debounced, ignore the controls for a while.
    if (Debounce > nowtime) return;

    // If the all-stop feature was chosen and the all-stop control keys are pressed, stop the
    // vehicle motors immedately. This is not realistic but it helps reduce frustration
    // in new-to-virtual-vehicles users.
    if (AllStop && (level & (CONTROL_FWD | CONTROL_BACK)) == (CONTROL_FWD | CONTROL_BACK))
    {
        Debounce = nowtime + 0.5;
        level = 0;
        CurrentSpeed = 0;
        llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, <0,0,0>);
        llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, <0,0,0>);
    }

    // Determine initial key presses and final key releases.
    integer pressed  = level & edge;
    integer released = ~level & edge;

    //Send control pressed/released messages to FX scripts (useful for fancy FX behaviors)
    if (pressed)    llMessageLinked(LINK_SET, pressed, "controls-pressed", id);
    if (released)   llMessageLinked(LINK_SET, released, "controls-released", id);

    // Some of the controls are remapped depending on the input method, so this control
    // key testing logic is a bitmore complex because of the differences.
    //
    if (level & CONTROL_FWD)
    {
        /**/ if (InputMethod == 1 || InputMethod == 2)
        {
            linear += MotorFwdFaster(localvel);
        }

        else if (InputMethod == 3)
        {
            angular += <0,MaxPitchSpeed,0>;
        }
    }

    if (level & CONTROL_BACK)
    {
        /**/ if (InputMethod == 1 || InputMethod == 2)
        {   
            linear += MotorFwdSlower(localvel);
        }

        else if (InputMethod == 3)
        {
            angular += <0,-MaxPitchSpeed,0>;
        }
    }

    // Side to side movement only happens out of mouselook view.
    if (!mouselook)
    {
        if (level & CONTROL_LEFT)
        {
            linear += <0,MaxSideSpeed,0>;
        }

        if (level & CONTROL_RIGHT)
        {
            linear += <0,-MaxSideSpeed,0>;
        }
    }

    if (level & CONTROL_UP)
    {
        /**/ if (InputMethod == 1)
        {
            integer maxgears = llGetListLength(Gears);
            ++CurrentGear;
            if (CurrentGear >= maxgears) --CurrentGear;

            // Notify FX scripts of the gear change
            llMessageLinked(LINK_SET, CurrentGear, "gear-up", id);
        }

        else if (InputMethod == 2)
        {
            linear += <0,0, MaxVertSpeed>;
        }

        else if (InputMethod == 3)
        {
            linear += MotorFwdFaster(localvel);
        }
    }

    if (level & CONTROL_DOWN)
    {
        /**/ if (InputMethod == 1)
        {
            integer maxgears = llGetListLength(Gears);
            --CurrentGear;
            if (CurrentGear < 0) CurrentGear = 0;

            // Notify FX scripts of the gear change.
            llMessageLinked(LINK_SET, CurrentGear, "gear-down", id);
        }

        else if (InputMethod == 2)
        {
            linear += <0,0,-MaxVertSpeed>;
        }

        else if (InputMethod == 3)
        {
            linear += MotorFwdSlower(localvel);
        }
    }

    // Compute the turning adjustment, based on the forward speed of the vehicle.
    // This makes them much more controllable.
    float   turnadj = MinTurnRatio + llFabs(localvel.x) / MaxFwdSpeed;
    if (turnadj > 1.0) turnadj = 1.0;

    // Adust using the turning controls depending on mouselook view. What this does is
    // make going into and out of mouselook view seamless in terms of the controls.
    //
    if (level & CONTROL_ROT_LEFT || level & (mouselook * CONTROL_LEFT))
    {
        /**/ if (InputMethod == 1)
        {
            angular += <0,0, MaxYawSpeed * turnadj>;
        }

        else if (InputMethod == 2)
        {
            angular += <-MaxBankSpeed * turnadj, 0, MaxYawSpeed * turnadj>;
        }

        else if (InputMethod == 3)
        {
            angular += <-MaxBankSpeed * turnadj, 0, 0>;
        }
    }

    if (level & CONTROL_ROT_RIGHT || level & (mouselook * CONTROL_RIGHT))
    {
        /**/ if (InputMethod == 1)
        {
            angular += <0,0, -MaxYawSpeed * turnadj>;
        }

        else if (InputMethod == 2)
        {
            angular += <MaxBankSpeed * turnadj, 0, -MaxYawSpeed * turnadj>;
        }

        else if (InputMethod == 3)
        {
            angular += <MaxBankSpeed * turnadj, 0, 0>;
        }
    }

    // Apply motors
    if (linear != ZERO_VECTOR)
    {
        llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, linear);
    }

    if (angular != ZERO_VECTOR)
    {
        llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular);
    }
}

timer()
{
    if (AutoBuoyancy == 0)
    {
        llSetTimerEvent(0);
        return;
    }

    // Get local speed.
    vector  vel       = llGetVel();
    vector  localvel  = vel / llGetRot();

    // Set the buoyancy based on the ratio of the local forward speed
    // and the lift speed.
    float   buoy = llFabs(localvel.x) / AutoBuoyancy;
    if (buoy > 1.0) buoy = 1.0;

    llSetVehicleFloatParam(VEHICLE_BUOYANCY, buoy);
}

link_message(integer sender, integer num, string msg, key id)
{
    if (msg == "sit-target")
    {
        Engage(id);
    }
}

}

WhiteCoreWebUI commented 6 years ago

you can close this issue i reinstalled with windows server 2008 and it works perfect now

appurist commented 6 years ago

That's good to hear.

I noticed in the script paste above that there are two back quotes at the start of the file, and it regularly changed back and forth from code mode (three back quotes start and end that). If there are any extra back quotes in the text pasted from the web browser, that would of course generate a compile error. Yet you were saying it was working in Standalone mode, so I suspect that's just a quirk of pasting the script here. Perhaps there are a lot of back quotes in the original source code for drawing lines or something. At any rate, if you have any further trouble with scripts, I'd check the in-world copy for back quotes just in case. But if the line number is the same all the time, I'm thinking all of this is unrelated.

For the InWorldz login, I'd like to follow up on that since we've had problems with registrations in the past that match your symptoms (web logins work but not viewer logins), but we've done some updates this past Friday night at about 7pm Pacific time that should have resolved that. Did you register after that, or prior to that point? If you've registered since then, could you tell me the avatar name so that I can check the log for errors? It likely means there's still a problem there that others aren't bothering to report.

In terms of Windows Server 2008 fixing it, I'm wondering if the script engine was having a problem fetching the script asset, that was resolved by changing OS, such as a firewall issue fetching the asset from WHIP (if you're using that). Especially if it's a KVM VM talking to Linux grid services. I'm also thinking that a CR/LF vs LF problem might explain the standalone vs gridmode aspect, if the assets were stored in standalone mode (standalone Windows region) then fetched from the Linux side later (or vice versa). It's not just a matter of toggling only the gridmode=true setting if the central grid servers are also changed to be running from a different machine (the KVM host), running a completely different OS (Linux) compared to the standalone tests. Perhaps it's working in the new installation because new assets are being created and stored and fetched with consistent expectations. (This would be a bug in the Halcyon code if you changed platforms and the asset data 'broke'. This may already be filed as an issue here.)

So to confirm, your scripts are compiling normally now, in grid mode? And if you could let me know the name of the avatar you were trying to log in with on InWorldz, I can investigate the registration problem there. Thanks.

WhiteCoreWebUI commented 6 years ago

hi, i cant login with the name "hammer time" neither on the website and viewer, but i got the registration email saying: Welcome to InWorldz, hammer time!

You will also need to download the latest viewer: InWorldz Viewer Downloads

We look forward to seeing you InWorldz!

And the registration was today.

Also Congratulations on this software i am amazed scripts work better than anywhere i have seen before.

appurist commented 6 years ago

Wow, in checking the log, I found a serious problem affecting all user registrations, which I have now fixed. Thank you so much for mentioning that you could not log in and providing the avatar name.

If you do want to try registering again as 'hammer time', this time it should go through correctly.

And yes, regarding the scripts, a tremendous amount of effort was put into designing and building a very very fast, reliable and proper script engine (named Phlox), mostly by one of the InWorldz and Halcyon founders, David Daeschler. Many other Halcyon developers have provided additional support there, like LSL functions, but we're very proud of his work and the other work that followed. And we do pay a considerable amount of attention trying to maximize compatibility with the SL implementations, but there are a lot of extensions to the SL functions. Here's a list if Halcyon-specific functions, as well as the long list of bot functions. Those should all work in any Halcyon installation, but there are also six sandbox regions (InWorldz Sandbox 1 thru 6) on the InWorldz grid if you want to try the "reference" installation. Have fun, and thank you again for the report.

WhiteCoreWebUI commented 6 years ago

Sorry to reopen this, i have the same issue again but i now figured the cause of it maybe something to look into, i added a new region also on windows server 2008, this time the only difference to the other regions is that this machine is running in my native language (german) and boom the issue is back, if i change the language to english the problem vanishes again

kf6kjg commented 6 years ago

I strongly suspect that there's a fair amount of code that assumes ASCII. I've not checked, but I don't think any of us has tried switching the server to any other language than English. Very Anglo-centric of us I know.

On Mon, Apr 2, 2018 at 2:05 PM ThunderLife notifications@github.com wrote:

Sorry to reopen this, i have the same issue again but i now figured the cause of it maybe something to look into, i added a new region also on windows server 2008, this time the only difference to the other regions is that this machine is running in my native language (german) and boom the issue is back, if i change the language to english the problem vanishes again

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/InWorldz/halcyon/issues/428#issuecomment-378046345, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGoaI8hFq2wB_ACDeB46pOO8psC5BmJks5tkpKGgaJpZM4SlcR4 .

appurist commented 6 years ago

@WhiteCoreWebUI Where are you using German? Are you pasting LSL text with German string constants into in-world scripts? If scripts, if you close the script and open it again, does it look like the end of the script is cut off (truncated)?

WhiteCoreWebUI commented 6 years ago

no the OS is in german, as soon as the language is not english somehow the simulator has issues compiling the scripts

WhiteCoreWebUI commented 6 years ago

@kf6kjg i suspect something like this and the reason i reopened this is i am probably not the last having this problem so if it comes up again knowing the cause will help troubleshooting others