New GTA2 Script Compiler

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler Preview v0.1

Post by B-$hep »

No, new compiler is almost (i repeat ALMOST) finished. It means not fully (!!!) but alot of commands work and also the IF..ELSE..ENDIF bug is fixed.

Im still working on it and will not stop until its done.

I will make release of current compiler soon to prove that im not making joke here with new compiler.
Nobody believes it. But they will.
Always wear safety glasses while programming.
Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Location: Russia, Gelendzhik
Contact:

Re: New GTA2 Script Compiler Preview v0.1

Post by Logofero »

B-$hep wrote:No, new compiler is almost (i repeat ALMOST) finished. It means not fully (!!!) but alot of commands work and also the IF..ELSE..ENDIF bug is fixed.

Im still working on it and will not stop until its done.

I will make release of current compiler soon to prove that im not making joke here with new compiler.
Nobody believes it. But they will.
It is wonderful that you are not abandoned 8-)

I suggest you do not create a bunch of those, and to lead and spread the progress of development so you'll differentiate amongst what has been done and what still remains, at the same time attract the attention of people.

Keep a log of the design and you will not be disappointed.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

I dont know if its good to post here or make new clean topic.
But anyways, here are the supported commands/operators that already work (in no particular order):

  • IF ELSE ENDIF // no more ELSE bug!
    WHILE..ENDWHILE
    WHILE_EXEC..ENDWHILE
    DO..WHILE_TRUE
    AND/OR
    LIGHT name
    ARROW_DATA name
    TIMER_DATA name
    BONUS name
    ONSCREEN_COUNTER
    COUNTER
    ADD_ONSCREEN_COUNTER
    PLAYER_PED
    OBJ_DATA
    LEVELSTART
    LEVELEND
    DO_NOWT
    SET_SHADING_LEVEL
    SET_BONUS_RATING_TEXT_ID
    SET_GANG_INFO
    SET_GANG_KILL_REACTION
    DISPLAY_MESSAGE
    DISPLAY_BRIEF
    DISPLAY_BRIEF_NOW
    DISPLAY_BRIEF_SOON
    IS_CAR_WRECKED
    CHANGE_POLICE_LEVEL
    SET_RECYCLE_MODEL_WANTED ( car model type )
    IS_CAR_IN_AIR( carname )
    HAS_CAR_JUST_SUNK ( carname )
    MAKE_CAR_A_DUMMY ( carname )
    MAKE_CAR_DRIVE_AWAY ( carname )
    GIVE_DRIVER_AND_BRAKE ( carname )
    SET_CAR_NO_COLLIDE ( carname )
    CLEAR_CAR_NO_COLLIDE ( carname )
    SETUP_MODELCHECK_DESTROY ( car model )
    SUPPRESS_THIS_CAR_MODEL ( model name )
    LABEL:RETURN
    GOSUB
    SET_AMBIENT_LEVEL
    DECLARE_POLICELEVEL
    DELAY_HERE(value)
    DELAY(intval)
    IS_GROUP_IN_CAR ( charname )
    HAS_BONUS_FINISHED ( charname )
    HAS_BONUS_PASSED ( charname )
    HAS_BONUS_FAILED ( charname )
    HAS_CHARACTER_DIED ( charname )
    ORDER_DRIVER_OUT_CAR ( charname )
    MAKE_CHAR_DO_NOTHING ( charname )
    STOP_CHAR_DRIVING ( charname )
    KILL_CHAR ( charname )
    CLEAR_KF_WEAPON ( charname )
    DESTROY_GROUP ( charname )
    DELETE_GROUP_IN_CAR ( charname )
    REMOVE_WEAPONS ( charname )
    CLEAR_WANTED_LEVEL ( charname )
    IS_ITEM_ONSCREEN ( name )
    IS_ITEM_ACCURATELY_ONSCREEN ( item name )
    DELETE_ITEM ( name )
    FORCE_CLEANUP ( object name )
    MAKE_ALL_CHARS_MUGGERS ( ON )
    MAKE_ALL_CHARS_MUGGERS ( OFF )
    ENABLE_CRANE ( crane name )
    DISABLE_CRANE ( crane name )
    STOP_THREAD ( thread_name )
    CLEAR_TIMER ( timer name )
    ENABLE_THREAD_TRIGGER ( trigger name )
    DISABLE_THREAD_TRIGGER ( trigger name )
    REMOVE_ARROW ( arrname )
    FINISH_LEVEL ( bonus_type )
    CHECK_ANSWERED_PHONE ( telephone name )
    CHECK_FAIL_PHONE_TIMER ( telephone name )
    STOP_PHONE ( telephone name )
    SET_PHONE_DEAD ( telephone name )
    OPEN_DOOR ( doorname )
    CLOSE_DOOR ( doorname )
    MAKE_DOOR_AUTOMATIC ( doorname )
    MAKE_DOOR_MANUAL ( doorname )
    KILL_ALL_PASSENGERS ( car name )
    GIVE_CAR_ALARM ( car_name )
    CHECK_ANY_WEAPON_TYPE_HIT_CAR ( car name )
    DECLARE_MISSIONS_PASSED_FLAG ( counter name )
    DECLARE_GANG_ONE_MISSIONS_PASSED_FLAG ( counter name )
    DECLARE_GANG_TWO_MISSIONS_PASSED_FLAG ( counter name )
    DECLARE_GANG_THREE_MISSIONS_PASSED_FLAG ( counter name )
    DECLARE_SECRETS_PASSED_FLAG ( counter name )
    DECLARE_SECRETS_FAILED_FLAG ( counter name )
    DECLARE_FINISH_SCORE
    MAP_ZONE
    GENERATOR
    SWITCH_GENERATOR (ON, OFF, INT)
    CAR_DATA
    OBJ_DATA
    DECLARE_TOTAL_SECRETS
    DECLARE_TOTAL_MISSIONS
    CHECK_DEATHARREST_EXECUTED()
    HAS_MODELCHECK_HAPPENED() //NOPARAMS!!!
    HAS_PARK_FINISHED() //NOPARAMS!!!
    IS_BRIEF_ONSCREEN() //NOPARAMS!!!
    MISSION_HAS_FINISHED() //NOPARAMS!!!
    CHECK_DEATHARREST_EXECUTED() //NOPARAMS!!!
    SAVE_GAME() //NOPARAMS!!!
    IS_BUS_FULL(bus/carname)
    ARE_EMERG_LIGHTS_ON(carname)
    IS_CAR_IN_AIR(carname)
    CHECK_CAR_HAS_DRIVER(carname)
    HAS_CAR_JUST_SUNK(carname)
    HAS_CAR_GOT_DRIVER(carname)
    IS_CAR_CRUSHED(carname)
    IS_CARBOMB_ACTIVE(carname)
    IS_CHARACTER_STOPPED(name)
    IS_CHAR_FIRING_ONSCREEN(name)
    IS_CHARACTER_IN_ANY_CAR(charname)
    IS_CHAR_PRESSING_HORN(charname)
    HAS_CHAR_SPOTTED_PLAYER(charname)
    HAS_CHAR_PUNCHED_SOMEONE(charname)
    IS_CHAR_STUNNED(charname)
    IS_CHAR_OBJECTIVE_PASSED(charname)
    IS_CHAR_OBJECTIVE_FAILED(charname)
    IS_CHAR_FALLING(charname) // IS_CHAR_IN_AIR
    HAS_CHAR_JUST_SUNK(charname)
    IS_CHAR_ON_FIRE(charname)
    HAS_CHAR_BEEN_ARRESTED(charname)
    CHECK_CHARACTER_HEALTH ( name , pointvalue )
Math operators

=
>
>=
<
<=
++
--
+
-
/
*
MOD

TODO

Implement NOT command!!
SET_GANG_INFO arrow id range check
** #IFDEF
** #ELSE
** #ENDIF
CREATE_CAR etc create cmds.


Of course there are more commands to add but like i said, i created helper tool that automatically generates most of the stuff for me. So it will not take long.
Always wear safety glasses while programming.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: New GTA2 Script Compiler

Post by T.M. »

Awesome. Will it be opensource?
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: New GTA2 Script Compiler

Post by Sektor »

I know this is a compiler but great that you figured out the commands that aren't in the decompiler, maybe they can be added sometime.

No mention of my favourite command CHANGE_GANG_CHAR_RESPECT :)
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

Yes it will be open source.

Sektor what you mean with commands not inside decompiler?
What commands exactly?

Im not home atm to look at the decompiler source and too lazy to download it.
I get home at the beginning of next week, i have a vacation atm.
Then i can also upload the tool i made for miss2, to quickly compile any mis script. If you can wait.

By just dropping mis file into tool icon/shortcut.

I made it for myself to quickly compile test scripts. To avoid wasting too much time opening it in miss2.

Here are some commands i reviewed today and checked bit by bit and they should work fine (it means they are added):
[mis]CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_explosion)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_drowning)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_punch)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_gun)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_car_bomb)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_fire)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_flamethrower)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_grenade)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_molotov)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_rocket_launcher)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_electro_weapon)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_shotgun)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_water_cannon)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_any_weapon)
CHECK_WEAPON_TYPE_HIT_CHAR(p1, by_any_foot_weapon)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_explosion)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_drowning)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_punch)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_gun)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_car_bomb)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_fire)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_flamethrower)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_grenade)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_molotov)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_rocket_launcher)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_electro_weapon)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_shotgun)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_water_cannon)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_any_weapon)
CHECK_WEAPON_TYPE_HIT_CAR(p1, by_any_foot_weapon)
CHANGE_CAR_REMAP(c1, 1)
CHANGE_CHAR_REMAP(c1, 1)
CHECK_CAR_REMAP(c1, 1)
CHANGE_CAR_LOCK(p1, no_lock)
CHANGE_CAR_LOCK(p1, locked)
CHANGE_CAR_LOCK(p1, lockout_thief)
CHANGE_CAR_LOCK(p1, unlocked)
CHANGE_CAR_LOCK(p1, locked_permanently)
CHANGE_CAR_LOCK(p1, lockout_player)
IS_CHARACTER_IN_MODEL(p1, copcar)
IS_CHARACTER_IN_CAR(p1, c1)
STORE_CAR_CHARACTER_IS_IN(p1, c1)
ORDER_CHAR_TO_BACKDOOR(p1, c1)
TAKE_REMOTE_CONTROL_OF_CAR(p1, c1)
ORDER_CHAR_TO_DRIVE_CAR(p1, c1)
IS_CHAR_IN_GANGZONE(p1, c1)
IS_TRAILER_ATTACHED(p1, c1)
IS_CHAR_IN_ZONE(p1, c1)
ADD_EXISTING_CHAR_TO_GROUP(p1, c1)
ADD_CHAR_TO_GANG(p1, shaft)
IS_CHAR_CAR_CAPACITY ( shaft, 4 )
ADD_SCORE_NO_MULT(shaft, 2)
ADD_SCORE(shaft, 2)
CHECK_SCORE_GREATER(shaft, 2)
CHECK_PASSENGER_COUNT(p1, 3)
check_car_damage_level(c1, 2)
CHECK_NUMBER_ALIVE_IN_GROUP(p1, 3)
CHECK_CAR_SPEED ( p1 , 3 )
ALTER_WANTED_LEVEL ( p1 , 6 )
SET_MIN_MEMBERS_BEFORE_GROUP_SPLITS ( p1 , 4 )
SET_CAR_NUMBER_GRAPHIC ( p1 , 2 )
DISPLAY_TIMER ( p1 , 50 )
ADD_LIVES ( p1, 3 )
CHECK_NUM_LIVES_GREATER ( p1 , 7 )
ADD_MULTIPLIER ( p1 , 4 )
SET_CAR_DENSITY ( p1 , 12 )
SET_GOODCAR_RATIO ( p1 , 12 )
SET_BADCAR_RATIO ( p1 , 12 )
SET_POLICECAR_RATIO ( p1 , 12 )
SET_PEDDENSITY ( p1 , 12 )
SET_MUGGER_RATIO ( p1 , 12 )
SET_CARTHIEF_RATIO ( p1 , 12 )
SET_ELVIS_RATIO ( p1 , 12 )
SET_GANG_RATIO ( p1 , 12 )
SET_POLICEPED_RATIO ( p1 , 12 )
SET_CHAR_MAX_RUNSPEED ( p1 , 1.4 )
ADD_TIME_TO_TIMER ( p1 , 60 )
ALTER_WANTED_LEVEL_NO_DROP ( p1 , 2 )
DECLARE_GANG_ONE_DEATH_BASE_BRIEF ( p1 , 2 )
DECLARE_GANG_TWO_DEATH_BASE_BRIEF ( p1 , 2 )
DECLARE_GANG_THREE_DEATH_BASE_BRIEF ( p1 , 2 )
STORE_BONUS_COUNT ( p1 , shaft )
CHECK_HEADS_GREATER ( p1 , 4 )
CHANGE_INTENSITY ( shaft , 3 )
SET_CHAR_MAX_DRIVESPEED ( shaft , 0.4 )
STORE_LAST_CHAR_PUNCHED ( p1 , p1 )
CHECK_CHAR_BEEN_PUNCHED_BY ( p1 , shaft )
MAKE_NEW_LEADER_OF_GROUP ( p1 , shaft )
PARK ( c1 , p1 )
DECIDE_POWERUP_FOR_CRANE ( p1 , shaft )
DECLARE_GANG_ONE_MISSION_FLAG ( p1 , p1 )
DECLARE_GANG_TWO_MISSION_FLAG ( p1 , p1 )
DECLARE_GANG_THREE_MISSION_FLAG ( p1 , p1 )
PARK_NO_RESPAWN ( p1 , p1 )
STORE_MULTIPLIER ( p1 , c1 )
PUT_CAR_ON_TRAILER ( p1 , c1 )
UPDATE_DOOR_TARGET ( p1 , c1 )
GET_CAR_INFO_FROM_CRANE ( p1 , c1 )
DECLARE_MISSION_FLAG ( p1 , c1 )
STORE_SCORE ( p1 , c1 )
STORE_NUM_LIVES ( p1 , c1 )
STORE_CAR_CURRENT_SPEED ( p1 , c1 )
STORE_CHAR_CAR_CURRENT_SPEED ( p1 , c1 )
SET_CHAR_OCCUPATION(p1,ANY_ELVIS )
SET_GROUP_TYPE(p1, MOB)
SET_CHAR_SHOOTING_SKILL (p1, crap_shot )
SET_CHAR_SHOOTING_SKILL (p1, normal_shot )
SET_CHAR_SHOOTING_SKILL (p1, crack_shot )
SET_CHAR_BRAVERY_LEVEL (p1, coward )
SET_CHAR_BRAVERY_LEVEL (p1, average )
SET_CHAR_BRAVERY_LEVEL (p1, loony )
HAS_CAR_GOT_WEAPON(c1, PISTOL)
HAS_CAR_GOT_WEAPON(c1, DUAL_PISTOL)
HAS_CAR_GOT_WEAPON(c1, ROCKET_LAUNCHER)
HAS_CAR_GOT_WEAPON(c1, MOLOTOV)
HAS_CAR_GOT_WEAPON(c1, ELECTRO_BATON)
HAS_CAR_GOT_WEAPON(c1, FLAME_THROWER)
HAS_CAR_GOT_WEAPON(c1, GRENADE)
HAS_CAR_GOT_WEAPON(c1, MACHINE_GUN)
HAS_CAR_GOT_WEAPON(c1, ELECTRO_GUN)
HAS_CAR_GOT_WEAPON(c1, SHOTGUN)
HAS_CAR_GOT_WEAPON(c1, SILENCED_MACHINE_GUN)
HAS_CAR_GOT_WEAPON(c1, FLAME_THROWER)
HAS_CAR_GOT_WEAPON(c1, GRENADE)
HAS_CAR_GOT_WEAPON(c1, CAR_BOMB)
HAS_CAR_GOT_WEAPON(c1, CAR_OIL)
HAS_CAR_GOT_WEAPON(c1, CAR_MINE)
HAS_CAR_GOT_WEAPON(c1, TANK_GUN)
HAS_CAR_GOT_WEAPON(c1, CAR_MACHINE_GUN)
HAS_CAR_GOT_WEAPON(c1, CAR_FLAMETHROWER)
HAS_CAR_GOT_WEAPON(c1, WATER_CANNON)
HAS_CAR_GOT_WEAPON(c1, Weapon_25)
HAS_CAR_GOT_WEAPON(c1, JEEP_GUN)
SET_KF_WEAPON(p1, pistol)
CHECK_CHAR_CURR_WEAPON(p1, pistol)
CHECK_CAR_MODEL(c1, COPCAR)
SET_ARROW_COLOUR(c1, red)
SET_ARROW_COLOUR(c1, green)
SET_ARROW_COLOUR(c1, blue)
SET_ARROW_COLOUR(c1, yellow)
CHECK_CAR_DAMAGE_POSITION(c1, front_left)
CHECK_CAR_DAMAGE_POSITION(c1, front_right)
CHECK_CAR_DAMAGE_POSITION(c1, back_left)
CHECK_CAR_DAMAGE_POSITION(c1, back_right)
CHECK_CAR_DAMAGE_POSITION(c1, window)
REMOVE_CHAR_FROM_GROUP(p1, shaft)
IS_CAR_ON_TRAILER(p1, shaft)
SET_ENTER_CONTROL_STATUS(p1, on)
SET_ENTER_CONTROL_STATUS(p1, off)
SET_ALL_CONTROLS_STATUS(p1, on)
SET_ALL_CONTROLS_STATUS(p1, off)
SET_CHAR_TO_STAY_IN_CAR(p1, on)
SET_CHAR_TO_STAY_IN_CAR(p1, off)
SET_CHAR_TO_USE_CAR_WEAPON(p1, off)
SET_CHAR_TO_USE_CAR_WEAPON(p1, off)
SET_DEATHARREST_STATE(p1, on)
SET_DEATHARREST_STATE(p1, off)
SET_CHAR_DRIVE_AGGRESSION(p1, off)
SET_CHAR_DRIVE_AGGRESSION(p1, off)
STOP_CHARS_GETTING_OFF_BUS(p1, on)
STOP_CHARS_GETTING_OFF_BUS(p1, off)
SET_CHAR_INVINCIBLE(p1, off)
SET_CHAR_INVINCIBLE(p1, off)
SET_CAR_BULLETPROOF(c1,on)
SET_CAR_BULLETPROOF(c1,off)
SET_CAR_FLAMEPROOF ( c1 , ON)
SET_CAR_FLAMEPROOF ( c1 , Off)
SET_CAR_ROCKETPROOF ( c1 , ON)
SET_CAR_ROCKETPROOF ( c1 , Off)
SET_CAR_JAMMED_ACCELERATOR ( c1 , ON)
SET_CAR_JAMMED_ACCELERATOR ( c1 , off)
SET_CAR_EMERG_LIGHTS ( c1 , ON )
SET_CAR_EMERG_LIGHTS ( c1 , off )[/mis]


Of course there are more commands added. I just keep loosing my track. There are hundreds of commands.
But im not so lost. I keep notes, what commands crash miss2, what do not even compile, whats added, what to add next etc.
Last edited by B-$hep on 26 Dec 2015, 11:40, edited 1 time in total.
Always wear safety glasses while programming.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: New GTA2 Script Compiler

Post by Sektor »

The decompiler doesn't support IF/WHILE/WHILE_EXEC or any command that jumps code.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

Currently here is updated list of supported commands atm.
I added lots of them today.

[mis]ADD_CHAR_TO_GANG
ADD_EXISTING_CHAR_TO_GROUP
ADD_LIVES
ADD_MULTIPLIER
ADD_ONSCREEN_COUNTER
ADD_SCORE
ADD_SCORE_NO_MULT
ADD_TIME_TO_TIMER
ALTER_WANTED_LEVEL
ALTER_WANTED_LEVEL_NO_DROP
AND/OR
ARE_EMERG_LIGHTS_ON
ARROW_DATA name
BONUS name
CAR_DATA
CHANGE_CAR_LOCK
CHANGE_CAR_REMAP
CHANGE_CHAR_REMAP
CHANGE_COLOUR
CHANGE_INTENSITY
CHANGE_POLICE_LEVEL
CHANGE_RADIUS
CHECK_ANSWERED_PHONE
CHECK_ANY_WEAPON_TYPE_HIT_CAR
CHECK_CAR_DAMAGE_LEVEL
CHECK_CAR_DAMAGE_POSITION
CHECK_CAR_HAS_DRIVER
CHECK_CAR_MODEL
CHECK_CAR_REMAP
CHECK_CAR_SPEED
CHECK_CHAR_BEEN_PUNCHED_BY
CHECK_CHAR_CURR_WEAPON
CHECK_CHARACTER_HEALTH
CHECK_DEATHARREST_EXECUTED
CHECK_FAIL_PHONE_TIMER
CHECK_HEADS_GREATER
CHECK_MULTIPLIER_GREATER
CHECK_NUM_LIVES_GREATER
CHECK_NUMBER_ALIVE_IN_GROUP
CHECK_PASSENGER_COUNT
CHECK_SCORE_GREATER
CHECK_WEAPON_TYPE_HIT_CAR
CHECK_WEAPON_TYPE_HIT_CHAR
CLEAR_CAR_NO_COLLIDE
CLEAR_KF_WEAPON
CLEAR_TIMER
CLEAR_WANTED_LEVEL
CLOSE_DOOR
COUNTER
DECIDE_POWERUP_FOR_CRANE
DECLARE_FINISH_SCORE
DECLARE_GANG_ONE_DEATH_BASE_BRIEF
DECLARE_GANG_ONE_MISSION_FLAG
DECLARE_GANG_ONE_MISSIONS_PASSED_FLAG
DECLARE_GANG_ONE_MISSIONS_TOTAL
DECLARE_GANG_THREE_DEATH_BASE_BRIEF
DECLARE_GANG_THREE_MISSION_FLAG
DECLARE_GANG_THREE_MISSIONS_PASSED_FLAG
DECLARE_GANG_THREE_MISSIONS_TOTAL
DECLARE_GANG_TWO_DEATH_BASE_BRIEF
DECLARE_GANG_TWO_MISSION_FLAG
DECLARE_GANG_TWO_MISSIONS_PASSED_FLAG
DECLARE_GANG_TWO_MISSIONS_TOTAL
DECLARE_MISSION_FLAG
DECLARE_MISSIONS_PASSED_FLAG
DECLARE_POLICELEVEL
DECLARE_SECRETS_FAILED_FLAG
DECLARE_SECRETS_PASSED_FLAG
DECLARE_TOTAL_MISSIONS
DECLARE_TOTAL_SECRETS
DELAY
DELAY_HERE
DELETE_GROUP_IN_CAR
DELETE_ITEM
DESTROY_GROUP
DISABLE_CRANE
DISABLE_THREAD_TRIGGER
DISPLAY_BRIEF
DISPLAY_BRIEF_NOW
DISPLAY_BRIEF_SOON
DISPLAY_MESSAGE
DISPLAY_TIMER
DO..WHILE_TRUE
DO_NOWT
ENABLE_CRANE
ENABLE_THREAD_TRIGGER
FINISH_LEVEL
FORCE_CLEANUP
GENERATOR
GET_CAR_INFO_FROM_CRANE
GIVE_CAR_ALARM
GIVE_DRIVER_AND_BRAKE
GOSUB
HAS_BONUS_FAILED
HAS_BONUS_FINISHED
HAS_BONUS_PASSED
HAS_CAR_GOT_DRIVER
HAS_CAR_GOT_WEAPON
HAS_CAR_JUST_SUNK
HAS_CHAR_BEEN_ARRESTED
HAS_CHAR_JUST_SUNK
HAS_CHAR_PUNCHED_SOMEONE
HAS_CHAR_SPOTTED_PLAYER
HAS_CHARACTER_DIED
HAS_MODELCHECK_HAPPENED
HAS_PARK_FINISHED
IF ELSE ENDIF // no more ELSE bug!
IS_BRIEF_ONSCREEN
IS_BUS_FULL
IS_CAR_CRUSHED
IS_CAR_IN_AIR
IS_CAR_ON_TRAILER
IS_CAR_WRECKED
IS_CARBOMB_ACTIVE
IS_CHAR_CAR_CAPACITY
IS_CHAR_FALLING
IS_CHAR_FIRING_ONSCREEN
IS_CHAR_IN_GANGZONE
IS_CHAR_IN_ZONE
IS_CHAR_OBJECTIVE_FAILED
IS_CHAR_OBJECTIVE_PASSED
IS_CHAR_ON_FIRE
IS_CHAR_PRESSING_HORN
IS_CHAR_STUNNED
IS_CHARACTER_IN_ANY_CAR
IS_CHARACTER_IN_CAR
IS_CHARACTER_IN_MODEL
IS_CHARACTER_STOPPED
IS_GROUP_IN_CAR
IS_ITEM_ACCURATELY_ONSCREEN
IS_ITEM_ONSCREEN
IS_TRAILER_ATTACHED
KILL_ALL_PASSENGERS
KILL_CHAR
LABEL:RETURN
LEVELEND
LEVELSTART
LIGHT name
MAKE_ALL_CHARS_MUGGERS
MAKE_CAR_A_DUMMY
MAKE_CAR_DRIVE_AWAY
MAKE_CHAR_DO_NOTHING
MAKE_DOOR_AUTOMATIC
MAKE_DOOR_MANUAL
MAKE_NEW_LEADER_OF_GROUP
MAP_ZONE
MISSION_HAS_FINISHED
OBJ_DATA
ONSCREEN_COUNTER
OPEN_DOOR
ORDER_CHAR_TO_BACKDOOR
ORDER_CHAR_TO_DRIVE_CAR
ORDER_DRIVER_OUT_CAR
PARK
PARK_NO_RESPAWN
PLAYER_PED
PUT_CAR_ON_TRAILER
REMOVE_ARROW
REMOVE_CHAR_FROM_GROUP
REMOVE_WEAPONS
SAVE_GAME
SET_ALL_CONTROLS_STATUS
SET_AMBIENT_LEVEL
SET_ARROW_COLOUR
SET_BADCAR_RATIO
SET_BONUS_RATING_TEXT_ID
SET_CAR_BULLETPROOF
SET_CAR_DENSITY
SET_CAR_EMERG_LIGHTS
SET_CAR_FLAMEPROOF
SET_CAR_JAMMED_ACCELERATOR
SET_CAR_NO_COLLIDE
SET_CAR_NUMBER_GRAPHIC
SET_CAR_ROCKETPROOF
SET_CARTHIEF_RATIO
SET_CHAR_BRAVERY_LEVEL
SET_CHAR_DRIVE_AGGRESSION
SET_CHAR_INVINCIBLE
SET_CHAR_MAX_DRIVESPEED
SET_CHAR_MAX_RUNSPEED
SET_CHAR_OCCUPATION
SET_CHAR_SHOOTING_SKILL
SET_CHAR_TO_STAY_IN_CAR
SET_CHAR_TO_USE_CAR_WEAPON
SET_DEATHARREST_STATE
SET_ELVIS_RATIO
SET_ENTER_CONTROL_STATUS
SET_FAVOURITE_MODEL
SET_GANG_INFO
SET_GANG_KILL_REACTION
SET_GANG_RATIO
SET_GOODCAR_RATIO
SET_GROUP_TYPE
SET_KF_WEAPON
SET_MIN_MEMBERS_BEFORE_GROUP_SPLITS
SET_MUGGER_RATIO
SET_PEDDENSITY
SET_PHONE_DEAD
SET_POLICECAR_RATIO
SET_POLICEPED_RATIO
SET_RECYCLE_MODEL_WANTED
SET_SHADING_LEVEL
SETUP_MODELCHECK_DESTROY
STOP_CHAR_DRIVING
STOP_CHARS_GETTING_OFF_BUS
STOP_PHONE
STOP_THREAD
STORE_BONUS_COUNT
STORE_CAR_CHARACTER_IS_IN
STORE_CAR_CURRENT_SPEED
STORE_CAR_MAX_SPEED
STORE_CHAR_CAR_CURRENT_SPEED
STORE_LAST_CHAR_PUNCHED
STORE_MULTIPLIER
STORE_NUM_LIVES
STORE_SCORE
SUPPRESS_THIS_CAR_MODEL
SWITCH_GENERATOR
TAKE_REMOTE_CONTROL_OF_CAR
TIMER_DATA name
UPDATE_DOOR_TARGET
WHILE..ENDWHILE
WHILE_EXEC..ENDWHILE[/mis]

CHECK_OBJ_MODEL( obj name , obj model ) seems buggy in miss2.
Not sure, have to check more.
Last edited by B-$hep on 27 Dec 2015, 11:52, edited 2 times in total.
Always wear safety glasses while programming.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: New GTA2 Script Compiler

Post by T.M. »

I noticed the list contained some grayed commands, so i realised those were either typed wrong, or my decompiler doesnt support them:
[mis]
CHANGE_COLOR should be CHANGE_COLOUR
STORE_MAX_CAR_SPEED should be STORE_CAR_MAX_SPEED
SET_CARDENSITY should be SET_CAR_DENSITY
IS_CHAR_IN_AIR should be IS_CHAR_FALLING, the internal name is "CHAR_IN_AIR" but the MIS-function name differs.
HAS BONUS PASSED should be HAS_BONUS_PASSED
[/mis]
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

Thats correct. I actually noticed duplicate items in the list.
So i quickly created simple Delphi app to sort and remove duplicates (because Notepad2 doesnt do that):

I updated the previous post.

Seems that only commands to add are now:
[mis]CHAR_DATA
LOCATE_CHARACTER_ANY_MEANS
LOCATE_CHARACTER_ON_FOOT
LOCATE_CHARACTER_BY_CAR
LOCATE_STOPPED_CHARACTER_ANY_MEANS
LOCATE_STOPPED_CHARACTER_ON_FOOT
LOCATE_STOPPED_CHARACTER_BY_CAR
IS_CAR_IN_BLOCK
CHECK_CAR_MODEL_AND_REMAP ( carname , model type , remap id )
CHECK_RESPECT_GREATER( playername , gangname , requiredlevel )
CHECK_RESPECT_LOWER ( playername , gangname requiredlevel )
CHECK_RESPECT_EQUAL( playername , gangname , requiredlevel )
IS_CHAR_FIRING_IN_AREA( name , float X , float Y , float Z , width , height )
CHECK_CAR_WRECKED_IN_AREA ( carname , x , y , z , width , height )
IS_POINT_ONSCREEN( float x , float y , float z )
CHECK_OBJ_MODEL( obj name , obj model )
LOCATE_ANOTHER_CHARACTER_ON_FOOT( main char , locate char , width , height )
SET_CHAR_THREAT_SEARCH
SET_CHAR_THREAT_REACTION
SET_CHAR_OBJECTIVE
DESTRUCTOR
THREAD_TRIGGER triggername = THREAD_WAIT_FOR_CHAR_IN_CAR
THREAD_TRIGGER triggername = THREAD_WAIT_FOR_CHAR_IN_BLOCK
THREAD_TRIGGER triggername = THREAD_WAIT_FOR_CHAR_IN_AREA
THREAD_TRIGGER triggername = THREAD_WAIT_FOR_ANSWER_PHONE
EXPLODE_WALL
EXPLODE_LARGE
EXPLODE_SMALL
EXPLODE_NO_RING
EXPLODE
CRUSHER
CHANGE_GANG_CHAR_RESPECT
REMOVE_BLOCK
ADD_NEW_BLOCK
CHANGE_BLOCK_TYPE
CHANGE_BLOCK_LID
CHANGE_BLOCK_SIDE
SWITCH_ROAD_OFF
SWITCH_ROAD_ON
DOOR_DATA
DO_PHONE_TEMPLATE
DO_EASY_PHONE_TEMPLATE
name = CREATE_DESTRUCTOR
LIGHT name = ...
SOUND name = ...
name = CREATE_LIGHT
name = CREATE_SOUND
LOWER_LEVEL
DECLARE_POWERUP_CARLIST
WARP_FROM_CAR_TO_POINT
SET_CHAR_GRAPHIC_TYPE
LOCATE_ANOTHER_CHARACTER_ON_FOOT
Bonus = START_BONUS_CHECK
IS_POINT_ONSCREEN
RADIO_STATION
LAUNCH_MISSION
SET_STATION_INFO
THREAD_ID name
LOCATE_ANOTHER_CHARACTER_ANY_MEANS
CHANGE_GANG_CHAR_RESPECT_AND_UPDATE
START_BASIC_KF_TEMPLATE
DO_BASIC_KF_TEMPLATE
PARKED_CAR_DATA
THREAD_TRIGGER triggername = THREAD_WAIT_FOR_CHAR_IN_AREA_ANY_MEANS
name = CREATE_GANG_CAR[/mis]

Some are easy, some require lots of parameters. But they will be done.
As you see, again some grayed items. I took them from doc.


Atm i take a break. My eyes hurt. Have to take a walk and relax. Its sunny day here.
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

I want you all know that i have been busy with my stuff around here.
I bought a new better used laptop. Now i can test and compile stuff much much faster.

I noticed some issues with compiler but nothing serious.
It has to do more with generating compiler than the actual compiler.

Im already working on it.
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

So i pinpointed the location of the "bug" that caused crash of the compiler. It happened because i forgot to add simple line of code (symctr++;) to each of the commands that check the state of things in GTA2 and return either true or false (i call them "bool" commands). Some examples: HAS_PARK_FINISHED(), HAS_CAR_GOT_DRIVER(...), IS_CAR_CRUSHED(...) etc etc.
These type of commands.

I will add that line and maybe at the end of the week i will release this compiler to public.
I havent finished the commands i mentioned in earlier post (post where i mentioned the last commands that are left).
Because i encountered problems with statements like:
[mis]if(HAS_PARK_FINISHED())
do_nowt
endif[/mis]

Crashed the compiler for the reason i wrote above. Now its fine and works.
Will make this little fix for all "bool" commands and finalize the last commands that are not yet done.
Always wear safety glasses while programming.
User avatar
Sektor
Boss
Boss
Posts: 1423
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: New GTA2 Script Compiler

Post by Sektor »

Good work
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

Sorry for delay. I had some issues with it but now they are resolved.
The "name = Create_something" style commands do not work yet.
and maybe 5-8 commands more like phone and kill frenzy templates.

But i will show it after i get home.
Dont expect it to be fully working and final.
Like i said, only few commands to add
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

I attached the compiler.
Dont expect it to fully working and dont try to compile multiscripts.
I have included readme file you should read.

Its not final version, im sure it contains bugs and may even crash GTA2.

You have been warned.
Im constantly working on it. Every day.
Currently i already noticed some bugs and i will work on them.

Virus scan results link is in the readme file.
Attachments
Gta2Miss9.7z
New Script Compiler Alpha
(204.93 KiB) Downloaded 937 times
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

I fixed many things.

I copy pasted basically half of the bil.mis and compiled and executed in Gta2.
No crashes and weapons, tokens, parked cars etc are displayed and working.

The OBJ_DATA command is the one that gives me trouble.
Bad logic behind it. I must rethink and rewrite that command.

Will continue in the morning.
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

Obj_data is fixed.
Today i will add some more commands.
Crane powerup or something is not yet added.
cranes work, also destructors but nothing is generated for car.

Its easy command.

The "name=create_car" and other create style commands i will implement very last.

Also currently #ifdef #endif are supported but they do nothing atm.
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

Ok guys.
One day i noticed big bug with BOOL commands like is_car_wrecked etc when they are used like:
[mis]counter c1=1
counter c2=2
counter c3=2
counter c4=2
LEVELSTART
IF ((((IS_CAR_WRECKED(c2) )
or ( c2=3 ) )
//ifjmp
or (IS_CAR_WRECKED(c2)))
//ifjmp
or ( c2=3 ) )
do_nowt
ENDIF
IF (((IS_CAR_WRECKED(c2) )
or ( c2=3 ) )
or ( c2 = 1 ))

do_nowt
ENDIF
IF(((IS_CAR_WRECKED(c2)) or
(IS_CAR_WRECKED(c2))) or
(IS_CAR_WRECKED(c2))) //and
do_nowt
do_nowt
ENDIF //ifjmp
LEVELEND[/mis]


It completely messed up whole compiled script.

Also these kind of scripts:
[mis]counter c1=1
counter c2=2
counter c3=2
counter c4=2
LEVELSTART
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT

ENDIF
if(c1=3)
do_nowt
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT

ENDIF
endIf
DO_NOWT

ENDIF
endif
if((c1=3) and
(c1=3))

do_nowt

endif
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT

ENDIF
ENDIF
ENDIF
ENDIF
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT

ENDIF
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT

ENDIF
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT

ENDIF
endIf
DO_NOWT

ENDIF
do_nowt

endif
if(((c1=3) and
(c1=35)) and
//IF_JUMP
(c1=11))
//IF_JUMP
do_nowt

endif //IF_JUMP
IF( (IS_CAR_WRECKED(c1)) and
(c1=1) ) //and (nextcar1=1) )

do_nowt

ENDIF
IF ( IS_CAR_WRECKED ( c1 ) )
do_nowt
IF (( c1 =1 )
and (c1=3))
//if_jump
do_nowt
IF ( IS_CAR_WRECKED ( c1 ) )
do_nowt
IF (( c1 =1 )
and (c1=3))
//if_jump
do_nowt

endif
do_nowt

endif
endif
do_nowt
IF ( (c1=99)
or (c1=88))

do_nowt

endif
endif
IF ( (c1=99)
or (c1=88))

do_nowt
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt
//0
endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=9)
do_noWt

endIf
DO_NOWT

ENDIF
endif
IF ( (c1=99)
and (c1=88))

do_nowt

endif
IF ( ((((( c1=3 )
AND ( c1=3 ) )

//ifjump
AND ( c1=3 ))
AND ( c1=3 ))
AND ( c1=3 ))
AND ( c1=3 ))
//ifjump
if(c1=3)
do_nowt

endif
DO_NOWT

ENDIF
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
//ifjump
do_nowt
IF ( (( c1=3 )
AND ( c1=3 ) ) AND
//ifjump
( c1=3 ))
//ifjump
if(c1=3)
do_nowt
IF ( (( c1=3 )
AND ( c1=3 ) ) AND
//ifjump
( c1=3 ))
//ifjump
if(c1=3)
do_nowt
IF ( (( c1=3 )
AND ( c1=3 ) ) AND
//ifjump
( c1=3 ))
//ifjump
if(c1=3)
do_nowt

endif
DO_NOWT

ENDIF
endif
DO_NOWT

ENDIF
endif
DO_NOWT

ENDIF
endif
if((c1=3) and
(c1=3))
//ifjump
do_nowt

endif
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
//ifjump
do_nowt
IF ( (( c1=3 )
AND ( c1=3 ) ) AND
//ifjump
( c1=3 ))
//ifjump
if(c1=3)
do_nowt

endif
DO_NOWT

ENDIF
endif
if(c1=3)
do_nowt
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=3)
do_nowt
IF ( (( c1=3 )
AND ( c1=3 ) ) AND
//ifjump
( c1=3 ))
//ifjump
if(c1=3)
do_nowt

endif
DO_NOWT

ENDIF
endif
DO_NOWT

ENDIF

endif
IF ( (( c1=3 )
AND ( c1=3 ) ) AND
//ifjump
( c1=3 ))
//ifjump
if(c1=3)
do_nowt

endif
DO_NOWT

ENDIF
IF ( (( c1=3 )
AND ( c1=3 ) ) AND
//ifjump
( c1=3 ))
//ifjump
if(c1=3)
do_nowt

endif
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))
//ifjump
do_nowt

endif
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
//ifjump
do_nowt
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
//ifjump
do_nowt
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
//ifjump
do_nowt
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
//ifjump
do_nowt

endif
endif
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
//ifjump
do_nowt

endif
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
//ifjump
do_nowt

endif
endif
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))
//ifjump
do_nowt

endif
endif
if((c1=3) and
(c1=3))

do_nowt

endif
if(c1=3)
do_nowt

endif
if(c1=3)
do_nowt

endif
if(c1=3)
do_nowt

endif
if(c1=3)
do_nowt

endif
if(c1=3)
do_nowt

endif
IF ( (( c1=3 )
AND ( c1=3 ) )
//ifjump
AND ( c1=3 ))
//ifjump
if(c1=3)
do_nowt

endif
DO_NOWT

ENDIF
if((c1=3) and
(c1=3))

do_nowt

endif
if(((c1=3) and
(c1=35)) and
//ifjump
(c1=35))

do_nowt

endif




IF( ((IS_CAR_WRECKED(c1)) and
(c1=1) ) and (c1=1) )

do_nowt

ENDIF
LEVELEND[/mis]


It took me 2 days to fix.

I hope you guys understand. Its not easy piece of software.
Especially the IF..ENDIF statements..

But now its fine.


But im not reuploading new version a fter every fix.
I do bunch of fixes and then upload.
Always wear safety glasses while programming.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: New GTA2 Script Compiler

Post by T.M. »

Might speed up the process of finishing this compiler if you released the source?
User avatar
B-$hep
Immortal
Posts: 568
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: New GTA2 Script Compiler

Post by B-$hep »

Its basically finished, just maybe 5 or even less commands to add.
Make supporting of #IFDEF #ENDIF (actually its supported but ignores the PC/PSX "flags").
And finally multiscript support.


NOT command needs to be figured out fully.
I worked on it last year but left it for later. Because it was a bit tricky, i was too lazy to think hard about its logic etc and i wanted to work on other things in compiler.
Always wear safety glasses while programming.
Post Reply