Skip to content

4.2.0 Release Plan #379

Closed
Closed

Description

@x87

Download

Features

float pos[3]
float rot[3]

foo(...pos)
...pos = get_char_coordinates $scplayer
set_char_coordinates $scplayer ...pos
...pos, ...rot = bar()


function foo(x: float, y: float, z: float)
end

function bar: float, float, float, float, float, float
end

function SetCamPos(pos: float[3], offset: float[3])
    Camera.SetFixedPosition(...pos, ...offset)
end

SetCamPos(100.0, 200.0, 44.1, 0.0, 1.0, 0.0)
  • support for variadic functions (functions where last argument accumulates a variable number of values as an array)
function loadModels(...models: int[16]) // allow up to 16 values
    int count = get_cleo_arg_count // get actual number of arguments, this is CLEO5 opcode
    count--
    int i

    for i = 0 to count
        request_model models[i]
    end
    load_all_models_now
end

// call with different number of arguments
loadModels()
loadModels(#ADMIRAL)
loadModels(#AMBULAN, #ALPHA)

Fixes

Breaking Changes

The compiler no longer scans the game directory to resolve the model id. Instead, it relies completely on the IDE configuration of the current mode #119. Existing modes have been updated to include the line (example for GTA SA):

<ide base="@game:\">@game:\data\gta.dat</ide>

This is the main file referencing other IDE files. It is called gta3.dat in GTA III, gta_vc.dat in GTA VC, and gta.dat in GTA SA. If you use a custom mode, update it accordingly to load that file.

Without this line you may experience compiler errors in CLEO scripts trying to compile a line with object model name.

Activity

  1. added this to the v4.2.0 milestone on Jul 14, 2025
  2. pinned this issue on Jul 14, 2025
  3. x87 commented on Jul 20, 2025

    @x87
    CollaboratorAuthor

    Quick Theme Preview

    theme_preview.mp4
  4. unpinned this issue on Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions