Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Bad.boy!

cleo file structure

Recommended Posts

Deji

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

Share this post


Link to post
Share on other sites
Bad.boy!

 

'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!

Share this post


Link to post
Share on other sites
Bad.boy!

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).

Share this post


Link to post
Share on other sites
LINK/2012

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

Share this post


Link to post
Share on other sites
Deji

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.

Share this post


Link to post
Share on other sites
LINK/2012

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

Share this post


Link to post
Share on other sites
Deji

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.

Share this post


Link to post
Share on other sites
Bad.boy!

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).

Share this post


Link to post
Share on other sites
LINK/2012
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?"

 

Share this post


Link to post
Share on other sites
Bad.boy!

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

Share this post


Link to post
Share on other sites
Bad.boy!

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

 

Share this post


Link to post
Share on other sites
Bad.boy!

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).

Share this post


Link to post
Share on other sites
Bad.boy!

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.

Share this post


Link to post
Share on other sites
LINK/2012

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

Share this post


Link to post
Share on other sites
Bad.boy!

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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