Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

cleo file structure


Bad.boy!
 Share

Recommended Posts

'THREAD' isn't the native-y name for that. In pure SCR coding, a thread only occurs on sweaters.

Link to comment
Share on other sites

 

'THREAD' isn't the native-y name for that. In pure SCR coding, a thread only occurs on sweaters.

That fixes the thread bug, it's SCRIPT_NAME in my compiler

 

EDIT:

Also fixed the wrong int bug, my compiler didn't switch from 8bit to 16bit int.

 

 

EDIT2: It's alive!

 

SCRIPT_NAME "WHILE"WHILE IS_PLAYER_PLAYING PLAYER   WAIT 0GET_CHAR_HEALTH PLAYER_CHAR healthIF health < 150i health += 5i IF health > 150i 	health = 150i ENDIF  SET_CHAR_HEALTH PLAYER healthENDIFENDWHILE

 

 

{$CLEO .cs}//-------------MAIN---------------thread "WHILE" :WHILE_9wait 0 [email protected] = Actor.Health($PLAYER_ACTOR)if   not [email protected] >= 150 else_jump @WHILE_82 [email protected] += 5 if  [email protected] > 150 else_jump @WHILE_74 [email protected] = 150 :WHILE_74Actor.Health($PLAYER_CHAR) = [email protected]:WHILE_82  Player.Defined($PLAYER_CHAR)else_jump @WHILE_9 

 

 

I still have to add labels and jumps, and then add more opcodes.

Edited by Bad.boy!
Link to comment
Share on other sites

Opcodes that uses integers can use float too, right?

 

Like

wait 100000000000000 = wait 100000000000000.0 (float)

 

Don't know why someone wants to use numbers higher than 32bit ints. But I'll make it just in case.

 

I've finished the GOTO opcode. Next up is gosub (easier version of goto, should be done quickly).

Link to comment
Share on other sites

But the game will not read this right, the game expects a integer in wait.

Link to comment
Share on other sites

The game will handle a float value just fine. The game reads floats and integer with the same function, which reads the data type and decides how to read the value.

Link to comment
Share on other sites

Maybe you didn't understand what I mean...

Yes, the game will read the float fine, but will not send the correct (in integer) value to CScriptThread::wakeTime.

 

The game will read the float, and will not do any kind of conversion to integer, since wait is expecting a integer, will not go right.

 

so

wait 1.0

will be like doing

wait 1065353216

 

I know that the float and integer is get in the same function (CScriptThread::getNumberParams).

Did you understood what I mean?

Edited by Link2012
Link to comment
Share on other sites

I knew that, but its not really a reason for the compiler to not support using floats in place of integers. Also I dont get why you're having to add these opcodes individually. Something like an xml file with opcode information should be the only thing that has to be changed per-opcode.

Link to comment
Share on other sites

I'll leave the float instead of int. I didn't want to use numbers that high anyway.

 

 

Also I dont get why you're having to add these opcodes individually. Something like an xml file with opcode information should be the only thing that has to be changed per-opcode.

I wanted to add opcodes in a xml or something, but I skipped it and added a few opcodes to test the compiler.

 

I've still got loads of work to do. I've recently discovered some bugs with "GOTO", I have to make the opcode list, make something to tell the user what they did wrong instead of a crash, the design of the program and maybe a popup menu in the textbox which shows opcodes, like visual studio does.

 

And if I get everything to work maybe improving the calculating part, now you have to end the senctence with i(nt) or f(loat).

Link to comment
Share on other sites

I knew that, but its not really a reason for the compiler to not support using floats in place of integers. Also I dont get why you're having to add these opcodes individually. Something like an xml file with opcode information should be the only thing that has to be changed per-opcode.

I understood his question as something like "If I put a float in WAIT the game will read good as a INTEGER?"

 

Link to comment
Share on other sites

That was my question, I was wondering because Sanny Builder converts ints that are higher than 32bit int to float.

Link to comment
Share on other sites

Is there some sort of rule of order of opcode parameters?

 

 

0223: set_actor [email protected] health_to 500 = OPCODE + VAR + INT009A: [email protected] = create_actor_pedtype 4 model #MALE01 at 0.0 0.0 0.0  = OPCODE + INT + INT + FLOAT + FLOAT + FLOAT + VAR01C8: [email protected] = create_actor_pedtype 23 model #SPECIAL01 in_car [email protected] passenger_seat 0  = OPCODE + VAR + INT + INT + INT VAR

 

Link to comment
Share on other sites

I'll leave the order problem to the user (me).

 

I completed the read opcodes from xml file and changed something in the design. I'll have to edit the main code again because it got really messy and to leave the possibility open to maybe add scm files in the future. The program also takes much memory compared to Sanny Builder (almost twice the memory whilst doing nothing).

Link to comment
Share on other sites

  • 2 weeks later...

It's been some time since I worked on this thing, anyway I've got a question about this datatype:

 

09 immediate 8 byte string

 

 

Especially the last bytes, are they a random value or do they actually do something?

 

For example:

 

AI = 09 48 41 00 00 B2 00 00 00 // .HA..²...HAIS = 09 48 41 49 53 53 00 54 00 // .HAISS.T.

 

 

------------------------------------

Calculating works, if-then-end works, if-then-else-end works. Comparing works, conditions works. Basically it's finished for simple scripts.

Link to comment
Share on other sites

They're nothing specific, just some memory trash after the null terminator.

Link to comment
Share on other sites

Does anyone know a good font for the compiler, or what is Sanny Builder's font?

Link to comment
Share on other sites

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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.