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

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

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

      1. Events
    1. Red Dead Redemption 2

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

    1. Grand Theft Auto Series

    2. GTA 6

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

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

    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. DYOM
      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. 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
    3. Gangs

    1. News

    2. Forum Support

    3. Site Suggestions

Seemann

[REL] Sanny Builder

Recommended Posts

Seemann

yep, I have a request for help, too.

 

So, Sanny Builder became fully multilingual. There are the English and Russian translations. But it would be so nice and helpful if someone translate it to another languages: french, german, dutch, polish, etc...

 

The file "How to translate.txt" contains all instructions about it.

 

If there are mistakes in the current translations (I'm sure of it wink.gif), the corrections are also welcome.

 

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

Available languages:

 

- Russian

- English (corrected by Y_Less)

- French (by tomworld10)

- Dutch (by -Shadow-Link, incomplete)

 

 

DOWNLOAD the language pack

all the languages are available with SB v2.99

Edited by Seemann

Share this post


Link to post
Share on other sites
Y_Less

http://www.y-less.com/sa/english.ini

 

I corrected a few minor grammar bits in the english one, though it may still not be perfect, I wish I knew more than one language to help more.

 

Also, did this version include the new & type and hex variables as they dont seem to work. Also, another request (sorry, I just have loads of ideas) could you include a 0x and 0b number format please so you can do:

 

0004: $somevar = 0x4f0a

0004: $othervar = 0b0011101101100110111011

 

This is all gearing up to doing:

 

$index = @label / 4

&0($index, 1i) = 0x01000464

 

which would put a 100 ms wait at label @label, which could be anywhere in the code, this system isn't limited to the FFFF range of global variables as an array index can legally be any 32 bit integer (probably within reason but can access any point in the code).

Share this post


Link to post
Share on other sites
Seemann

 

I corrected a few minor grammar bits in the english one, though it may still not be perfect, I wish I knew more than one language to help more.

 

Thanks a lot cookie.gif

 

 

Also, did this version include the new & type and hex variables as they dont seem to work.

 

Sh**t. Stupid minor bugs that f**k up all my work. Nevertheless, it's fixed.

There is a little patch that corrects the &-type. Should work until the new version isn't come.

 

http://sannybuilder.com/SB_2.98_patch.rar

 

 

Also, another request (sorry, I just have loads of ideas)

 

It's OK, I like new ideas, they help us to improve the program.

 

 

could you include a 0x and 0b number format please

 

Wow, it is a kind of a hardcode thing, why not convert to decimal format? calc.exe can do it smile.gif The SB3 engine should support this stuff, in the current versions it's impossible.

 

 

an array index can legally be any 32 bit integer

 

Really? If so, those ones must have 4 bytes of length but there is only 2. An array syntax is

 

(1 byte) (2 bytes) (2 bytes) (1 byte) (1 byte)

 

5 bytes in total, isn't it? How do the indexes can be 32-bit?

Edited by Seemann

Share this post


Link to post
Share on other sites
Y_Less

They're 32 bit because they're stored in variables. Variable references are 16 bit but the numbers they store are 32 bit. Can't wait to see what v3 has in store wow.gif. And cheers for the patch, keep up the excellent work.

 

Edit:

 

& type arrays dont work, either as the array or the index.

Edited by Y_Less

Share this post


Link to post
Share on other sites
Seemann

 

& type arrays dont work, either as the array or the index.

Yes, because it will be in the next version (2.99 maybe). This patch changes the only number in the code (&-variable writing routine)

Share this post


Link to post
Share on other sites
tomworld10

Hi,

 

 

But it would be so nice and helpful if someone translate it to another languages: french, german, dutch, polish, etc...

 

From Y_less's file I've translated most things

 

here the french

 

those are not translated :

 

all CST_ ; EInternalError ; ERR_0025 ; ERR_0026 ; ERR_0029 ; ERR_0030 ; ERR_0031 ; ERR_0032 ; ERR_0033 ; ERR_0035 ; ERR_0037 ; ERR_0043 ; ERR_0044 ; ERR_0046 ; ERR_0057 ; ERR_0059 ; ERR_0060 ; ERR_0061 ; ERR_0079 ; ERR_0080 ; ERR_0082 ; MSG_0016 ;

 

I'm sorry, but please be nice to german, dutch, polish and other people, ask someone else (not me) to translate in those language..... I'm not able to do it properly....

 

 

 

 

 

 

Since Y_less handles advance requests, I'll take care of the noob's requests (sorry, and sorry again there are many of them) :

 

- Making a new file by double cliking on the empty space on the right beside the existing tabs just like firefox

 

- A button in tool bar for replace. Please, please, please.... smile.gif

 

- Full help accessible from Sanny in a new window, with all the files in help folder.

 

- Being able to convert selection not all the document and don't have to save the file first.

 

- Open the readme in sanny builder when clicking content

 

- Player z_angle in coords manager and the ability to modify files while it's open. And maybe more option in the coords manager text buffer, like in a table and where you can add text description, and to save the text buffer.

 

- More bookmarks....

 

- this one is a bit useless but could be cool sometimes : having a line in sascm.ini that give the name, the version, the author, the params order, etc... many infos about the mainscm.ini itself. And then Sanny when decompiling writes those infos in top of text file. Then it could as well check on compiling if the same is used to prevent crashing and tell to use Xieîn's code converter.

 

- Add Xieîn's code converter in Sanny with user friendly crap...

 

 

Maybe the day I'll finish my coding tutorial, you'll be interrested, but will it be finished one day ?? That is the question !!!!!!!

 

 

That's all folks

 

 

Have fun

Edited by tomworld10

Share this post


Link to post
Share on other sites
Seemann

 

From Y_less's file I've translated most things

 

here the french

 

And thank you too cookie.gif

 

Could you translate the other fields?

 

 

From now I have 4 lang translations:

 

- Russian

- English (corrected by Y_Less)

- French (by tomworld10)

- Dutch (by -Shadow-Link)

 

 

 

- A button in tool bar for replace. Please, please, please....

 

hmm, The such button is already there (at the right of Find button).

 

 

- Full help accessible from Sanny in a new window, with all the files in help folder.

 

We want to make a complex help in .CHM format with the complete help info inside.

 

 

- Open the readme in sanny builder when clicking content

 

hmm (once again). The Readme should be open by clicking this one (if you mean the menu item Help->Contents...).

 

 

- Player z_angle in coords manager and the ability to modify files while it's open.

 

Ok. Btw, do someone know the memory addresses of the player coords and angle for GTA3?

 

 

- More bookmarks....

 

too hard, too hard... I'll try, but... wink.gif

 

 

- this one is a bit useless but could be cool sometimes : having a line in sascm.ini that give the name, the version, the author, the params order, etc... many infos about the mainscm.ini itself. And then Sanny when decompiling writes those infos in top of text file. Then it could as well check on compiling if the same is used to prevent crashing and tell to use Xieîn's code converter.

 

Yeah, I want it too, but it depends on the ini updaters (space, Python, others). It's necessary to add in the .INI such fields:

 

VERSION =AUTHOR (published by) =DATE = 

 

and to release the updates with these ones. When decompiling SB writes something like:

 

// This file was decompiled with the __SCM.INI published by  on {$VERSION }

 

The directive $VERSION could help us with the converting the file.

 

 

Is there any opinions there about it?

Edited by Seemann

Share this post


Link to post
Share on other sites
tomworld10

Hi,

 

 

 

Could you translate the other fields?

 

Well I can but most of them are error messages and I think they make much more sens in english, than translating in french. And I think you'll probably like better to have users sending english error message than french error message....

 

If you really want to (and you seem), I will translate them all, but then I don't know if the french coders will understand better the french than english error message...

 

About the CST_s I'm sorry but I thought it wouldn't make sens to translate them. Looking back I see that I should. So I will.

 

 

 

 

 

- A button in tool bar for replace. Please, please, please....

 

hmm, The such button is already there (at the right of Find button).

 

 

I'm sorry maybe my computer hides it, Maybe I'm a bit blind, I don't know but I just can see a replace button at the right of the search tool :

user posted image

 

 

 

- Open the readme in sanny builder when clicking content

 

hmm (once again). The Readme should be open by clicking this one (if you mean the menu item Help->Contents...).

 

 

Because yes, it opens it, but open it in notepad, and in my request I said IN (or with) Sanny Builder (even if later it's with the rest of the help). It' seems totally useless but I think it will make people read the readme more often, because it makes code pieces of the readme highlighted, and don't close notepad straight away.

 

 

About the .ini, you've exactly seen what I wanted (maybe you actualy red what I've written), I know it depends on the .ini releaser but if sanny's sascm.ini has it then I think quicly most of them will, and it isn't really hard to change.

 

 

About bookmarks do what you can, it's not that important but would still be cool.

 

 

 

Thanks for your work and your answers.

 

 

Have fun

Share this post


Link to post
Share on other sites
Seemann

 

If you really want to (and you seem), I will translate them all, but then I don't know if the french coders will understand better the french than english error message...

 

no, if you think that the translating of the rest don't help (and is not necessary), do not make it.

 

 

I'm sorry maybe my computer hides it, Maybe I'm a bit blind, I don't know but I just can see a replace button at the right of the search tool

seems you are not using SB 2.98. Such button is there in the last version.

Look at this screen. Do you see the Replace button?

 

 

Because yes, it opens it, but open it in notepad, and in my request I said IN (or with) Sanny Builder

 

I understand but think it's really useless. Only the window popping up at startup make the users read the readme more often. wink.gif

 

Share this post


Link to post
Share on other sites
tomworld10

Sorry, I didn't read first post !!!!!! I was looking on old webpage, sorry, about that.

 

Have fun

 

 

EDIT : Updated french.ini now !!!! (most) Mistakes corrected, langID added, and tested

 

Just so you know, in user tools it doesn't handle a french letter, I get a russian one instead. Beside that everything works fine, I just had to keep the restart button in otptions in english because the french doesn't fit in.

 

So funny having Sanny in french !!!!!

Edited by tomworld10

Share this post


Link to post
Share on other sites
Seemann

 

in user tools it doesn't handle a french letter, I get a russian one instead

What a letter is it? Is there a screenshot? Is it displayed correctly in the other windows?

Share this post


Link to post
Share on other sites
tomworld10

Hi,

 

 

My boss will kill me tomrrow don't be afraid if I don't reply next....

 

 

 

But I do get that :

user posted image

 

 

instead of getting this word :user posted image

 

You get it ???

 

 

In english it doesn't matter but in other languages you get to see it, and by this day (This is a dreaming day for me today, maybe the war in middle east going for 50 years will be finished -yeah I do know I'm reallly dreaming..., but sometimes you really wish your dreams will come true....-) it doesn't really matters...

 

Well that's it

 

 

Have fun (not war...)

 

 

And please if you want to kill people do it in GTA not in real life please, please, it hurts to much to see people killed for stupid reasons.....

 

Really do have fun in life because even if it doesn't seems to life is so fun !!!!!!!!!!!!!!!!!!!!!!!!!

 

 

So please....

 

 

Have fun

Edited by tomworld10

Share this post


Link to post
Share on other sites
pdescobar

First off, let me say this tool is wonderful. I've just gotten into mission coding and after talking a bit with Y_Less decided that I should just go with Sanny (almost) right away. So far, I've really been impressed. I'm sure I'll have some feature requests and have some contributions to the reference files later, but for now I want to mention an odd problem that got me and might get other newbie coders too.

 

Short version: if you decompiled the original scripts with the "write opcodes" option unchecked (the default) be VERY CAREFUL about using the VAR construction, because otherwise you may run into unforseen strangeness.

 

Long version: After decompiling the original scripts (with the write opcodes option off) I added a thread at the end of main. That thread looked something like this:

 

:myVarTestthread 'VARTEST'var [email protected]:  Int    [email protected]:  Array 25 of Float end// Some stuff playing with arrays that doesn't actually matterend_thread

 

 

Since much of the original code that followed didn't have the opcodes listed, my type declarations were then enforced for all the external scripts (and probably all the missions too). Thus everywhere afterwards that Sanny encountered local variables [email protected] through [email protected] and had to guess about what opcodes to use, it picked the floating-point opcodes. And so, imagine my surprise when I tried to play the video poker machine and found out that instead of $10 to play, it was asking for $1,092,616,192.

 

To be fair, the Readme does say, "Also the locals can be declared. But in this case, in each thread this local will have the same type." But at the time, I didn't realize the full implications of that statement. tounge2.gif

 

If possible, in future versions, I'd like to see the type declarations go away once the enclosing thread goes out of scope. If that's not easily done, some kind of statement to manually "un-type" the vars afterwards would be good. But for now, I've gone back and made sure I start with original sources decompiled with "write opcodes" checked and will be a bit more careful about shortcuts like the VAR construct. wink.gif

 

 

EDIT: Found a problem in vars.ini: vars 45 and 9734 are both described as "selected_haircut" so both $45 and $9734 are replaced by $SELECTED_HAIRCUT on decompilation and then when you recompile, all statements which used to refer to $9734 now operate on $45 instead.

Edited by pdescobar

Share this post


Link to post
Share on other sites
spaceeinstein
Why can't I add opcodes without the program crashing? I tried to add 0A4F=0, into the ini file but that crashes the builder.

Share this post


Link to post
Share on other sites
Flapy

hi i've a little problem with Sanny builder. First i tried to decompile an original main.scm file, and it worked great. i changed some car-spawn points and some other "easy" things.

But when i tried to decompile a modded script (it was modded by wauzie and eclipse), i get an error: "invlalid pointer operation"

but the strange thing is, i can decompile the modded script with SABuilder033. When i use the main.txt file (decompiled with SaBuilder033) and open it with Sanny builder and then choose "convert MB>SB" and then try to compile i get an error again: "Unknown data type of array [email protected] Use i, f, s or v " the compiler selects this line:

 

01AF:   car [email protected]([email protected],7i) [email protected]([email protected],7i):in-sphere/%near_point -2054.474  222.6438  35.8767 radius  6.0  6.0  3.0

 

can anybody help me please whatsthat.gif

Share this post


Link to post
Share on other sites
BMWPower

I'm getting thi error when i try to compile, i added 2 parked cars..

 

user posted image

 

Share this post


Link to post
Share on other sites
pdescobar

 

I'm getting thi error when i try to compile, i added 2 parked cars..

 

user posted image

That screenshot looks like you are trying to compile Mission Builder source in Sanny. Make sure you are either working on source that was decompiled in Sanny or run your source through the MB->SB code converter on the Tools menu before you try and compile it.

 

=========

 

@Flapy: the syntax of that statement looks strange. That "[email protected]([email protected],7i):in-sphere/%" is supposed to be either a 0 or 1 (or possibly simply "in-sphere") by my reading of the SASCM.INI file and so what you have is probably confusing the parser. No idea on your decompilation issue.

Share this post


Link to post
Share on other sites
Flapy

ok thanks for your reply:) however i didnt found how to make that line "correct" (im new to modding). but i removed the whole mission that caused the problem; and i can compile now tounge2.gif

Share this post


Link to post
Share on other sites
Seemann

@ tomworld10

 

instead of getting this word

Fixed. Those font does not support unicode chars, I've changed him to MS Sans Serif font and it's ok now.

 

@ pdescobar

 

Thus everywhere afterwards that Sanny encountered local variables [email protected] through [email protected] and had to guess about what opcodes to use, it picked the floating-point opcodes.

First of all, what version do u use?

Sanny uses the floating (integer) opcodes if there is an expression where both operands are the variables. ([email protected] = [email protected]) and they are declared as float (int). If there is an opcode on that line, Sanny will use him.

 

The expressions where one of the operands is a variable and the second one is a number ([email protected] = 0.0) are compiled depending on THE NUMBER TYPE (0005 in that case), NOT DECLARED.

 

So, if you declared the variable with type Float, it does not mean that this one will be compiled as Float always (only in first case I said: var = var, var > var).

 

So, is this bug ($1,092,616,192 instead of $10) solved when you remove the VAR declaration? May be there is the conflict between the variabled named same ($SELECTED_HAIRCUT)? I will check the vars.ini once again.

 

 

Found a problem in vars.ini
Yep, thanx.

 

@ spaceeinstein

 

Why can't I add opcodes without the program crashing? I tried to add 0A4F=0, into the ini file but that crashes the builder.
Does this opcode exist? CyQ wrote that the highest opcode is $0a4e. I set this limit in Sanny and it does not read any opcodes over. It's changed now (the limit is removed).

 

@ Flapy

 

But when i tried to decompile a modded script (it was modded by wauzie and eclipse), i get an error: "invlalid pointer operation"

Version?

 

Tried to decompile once more? Make sure the script.img is correct.

 

 

then try to compile i get an error again: "Unknown data type of array [email protected] Use i, f, s or v " the compiler selects this line:

 

01AF:   car [email protected]([email protected],7i) [email protected]([email protected],7i):in-sphere/%near_point -2054.474  222.6438  35.8767 radius  6.0  6.0  3.0 

 

Do you see the words :in-sphere/%near_point after the array? Looks like SAMB decompiled it wrong, so Sanny could not detect the array type. Just delete this.

Share this post


Link to post
Share on other sites
pdescobar

 

@ pdescobar

 

Thus everywhere afterwards that Sanny encountered local variables [email protected] through [email protected] and had to guess about what opcodes to use, it picked the floating-point opcodes.

First of all, what version do u use?

Sanny version 2.98 plus the & patch.

 

 

Sanny uses the floating (integer) opcodes if there is an expression where both operands are the variables. ([email protected] = [email protected]) and they are declared as float (int). If there is an opcode on that line, Sanny will use him.

Right. I understand that.

 

 

The expressions where one of the operands is a variable and the second one is a number ([email protected] = 0.0) are compiled depending on THE NUMBER TYPE (0005 in that case), NOT DECLARED.

 

So, if you declared the variable with type Float, it does not mean that this one will be compiled as Float always (only in first case I said: var = var, var > var).

 

Uh, that's not what your documenation says. See below:

 

Also if you declare variable as Float and will try to write to it an integer value, compiler will convert this to floating-point value:

 

var

  $fVar: Float

end

  $fVar = 1

 

it will be written as $fVar = 1.0

According to that, the declaration takes precedence over the type of the parameter in the statement which is the behavior I was seeing. Integers were being changed to floats and compiled with the float opcodes due to the VAR declaration telling them to be floats.

 

 

So, is this bug ($1,092,616,192 instead of $10) solved when you remove the VAR declaration? May be there is the conflict between the variabled named same ($SELECTED_HAIRCUT)? I will check the vars.ini once again.

 

Yes, once the VAR declaration was commented out of my custom thread, the type mismatches went away and the casino games behaved normally.

Share this post


Link to post
Share on other sites
Seemann

 

Uh, that's not what your documenation says. See below:

 

Also if you declare variable as Float and will try to write to it an integer value, compiler will convert this to floating-point value:

 

var

  $fVar: Float

end

  $fVar = 1

 

it will be written as $fVar = 1.0

According to that, the declaration takes precedence over the type of the parameter in the statement which is the behavior I was seeing. Integers were being changed to floats and compiled with the float opcodes due to the VAR declaration telling them to be floats.

 

whoa, holy sh*t!!! You damn right, it's just ïèçäåö.

I have never imagined that it may conflict. Seems, I should remove this auto-typization and compile depending on the number type only. I'm really sad because it was very handy feature.

Share this post


Link to post
Share on other sites
spaceeinstein
@ spaceeinstein

 

Why can't I add opcodes without the program crashing? I tried to add 0A4F=0, into the ini file but that crashes the builder.
Does this opcode exist? CyQ wrote that the highest opcode is $0a4e. I set this limit in Sanny and it does not read any opcodes over. It's changed now (the limit is removed).

That opcode existed in the XBox main.scm.

Share this post


Link to post
Share on other sites
BMWPower

@pdescobar:

10x, i'll try that. colgate.gif

Share this post


Link to post
Share on other sites
Bigun

Great builder. I have a few suggestions, nothing like Y_Less's ones but rather small simple ones. First, Model.Destroy should be corrected to Model.Unload (or Release). "thread" shortcut can be confusing and should still be "name_thread". More shortcuts added for example like in keywords.txt to commonly used opcodes.

The abillity to customize all data symbols in the Options window to whatever character you want,and whether they should appear before or after the data (I'm talking about @label [email protected] $global &hex etc).

And an SB->MB converter, so you can post your SB code on the forums and everybody can use it (MB users can use it and SB can use the MB->SB converter). That's it I think. This is definately the best builder around, so keep up the great work.

Share this post


Link to post
Share on other sites
pdescobar

I've got a somewhat odd question regarding vars.ini. The default Mission Builder 0.33 variables.ini alias for $409 was $ON_MISSION while the default Sanny 2.98 vars.ini alias is $ONMISSION. For what it's worth, I think the MB-style one makes more sense, but in order to resolve compatibility conflicts when using copied source from others, instead of changing it to my preferred alias (or living with the default) I've decided to enter *both* of them in vars.ini like so:

 

 

389=girlfriend409=onmission409=on_mission417=flag_external_script_BCESAR2

 

 

Now, in limited testing this seems to work as a source file using both $ONMISSION and $ON_MISSION compiled both as $409 (and then decompiled them with my preferred $ON_MISSION alias probably because it was later in the file). So it seems like this use of multiple aliases will be okay as long as all the alias names are unique, but I'm curious if anyone else has tried it and if there are unforseen difficulties I may run into later.

 

 

 

Also, I'd like to request an option to have warnings for unrecognized variable aliases. For example, if I use the variable $ON_MISION, currently Sanny will simply add a new global variable for that at the end of the list. However, I'd love an option which will give a warning something like "$ON_MISION is unrecognized and will be added to the global variable space" just in case it was a typo rather than an intended new variable. And since it would be an option, it could be turned off for those who would find it more annoying than useful. wink.gif

Share this post


Link to post
Share on other sites
Seemann

 

First, Model.Destroy should be corrected to Model.Unload (or Release). "thread" shortcut can be confusing and should still be "name_thread". More shortcuts added for example like in keywords.txt to commonly used opcodes.

 

All the classes or the keywords changes will be only in SB3. Now it's impossible, because it will cause the compatibility problem for the old scripts.

 

 

The abillity to customize all data symbols in the Options window to whatever character you want,and whether they should appear before or after the data (I'm talking about @label [email protected] $global &hex etc).

 

Hmm. I'm sure that this never to be done. How do you imagine if you post your code somewhere with your own datatypes how other users can compile this one? If you have some opinion about what datatypes characters should be there, tell it.

 

 

And an SB->MB converter, so you can post your SB code on the forums and everybody can use it (MB users can use it and SB can use the MB->SB converter).

 

No. I do not want to do such converter. If somebody else wants, just do it, not me.

 

 

I've got a somewhat odd question regarding vars.ini. The default Mission Builder 0.33 variables.ini alias for $409 was $ON_MISSION while the default Sanny 2.98 vars.ini alias is $ONMISSION. For what it's worth, I think the MB-style one makes more sense, but in order to resolve compatibility conflicts when using copied source from others, instead of changing it to my preferred alias (or living with the default) I've decided to enter *both* of them in vars.ini like so:

 

 

389=girlfriend409=onmission409=on_mission417=flag_external_script_BCESAR2 

 

 

Now, in limited testing this seems to work as a source file using both $ONMISSION and $ON_MISSION compiled both as $409 (and then decompiled them with my preferred $ON_MISSION alias probably because it was later in the file). So it seems like this use of multiple aliases will be okay as long as all the alias names are unique, but I'm curious if anyone else has tried it and if there are unforseen difficulties I may run into later.

 

 

Should work without any difficulties. The only problem may appear that the decompiler will use the different aliases because the variables list is sorting differently sometimes ($ommission may go first, in another time it may go second after $on_mission). So, in the decompilled code the different variables names may be used. But the compiler will compile both aliases correctly, as $409.

 

I will not add this alias to vars.ini, but add it to MB->SB converter in order when MB's code is converted the variable $ON_MISSION changes to $ONMISSION

 

 

Also, I'd like to request an option to have warnings for unrecognized variable aliases. For example, if I use the variable $ON_MISION, currently Sanny will simply add a new global variable for that at the end of the list. However, I'd love an option which will give a warning something like "$ON_MISION is unrecognized and will be added to the global variable space" just in case it was a typo rather than an intended new variable. And since it would be an option, it could be turned off for those who would find it more annoying than useful.

 

I don't know how to do it. How the compiler may distinguish between the correct name and the incorrect one? Maybe the user has written $ON_MISION specially? The only way to do it, make the list of the incorrect names, and then tell to the compiler read them and compare with the names in the code, to find the mistypes. So, more easy and useful is to check your own code more carefully.

Edited by Seemann

Share this post


Link to post
Share on other sites
pdescobar

 

Also, I'd like to request an option to have warnings for unrecognized variable aliases. For example, if I use the variable $ON_MISION, currently Sanny will simply add a new global variable for that at the end of the list. However, I'd love an option which will give a warning something like "$ON_MISION is unrecognized and will be added to the global variable space" just in case it was a typo rather than an intended new variable. And since it would be an option, it could be turned off for those who would find it more annoying than useful.

 

I don't know how to do it. How the compiler may distinguish between the correct name and the incorrect one? Maybe the user has written $ON_MISION specially? The only way to do it, make the list of the incorrect names, and then tell to the compiler read them and compare with the names in the code, to find the mistypes. So, more easy and useful is to check your own code more carefully.

The compiler doesn't have to distinguish between correct and incorrect names, it just has to recognize that a particular name is potentially incorrect and let me know so that I can determine if it's correct myself.

 

When you parse the file and come across $FOO you have to make some determination what $FOO means; so you have to either translate $FOO based on a vars.ini entry or increase the global variable space and assign the next variable if it's "new", right? What I am thinking of is if it is treated as new and this warning is enabled, you also add the string 'FOO' to a list and then when the compilation is done you output this list if it's non-empty in a warning dialogue. I can then look at that list and make sure everything on it is something I intended to be a new variable as opposed to a mistyped alias.

 

Since you don't have to declare variables before you use them in mission-coding, that kind of check just seems quite useful to me; maybe I'm just a much worse typist than the average person. tounge2.gif Finding a mistyped variable in your code is often not at all easy in my experience, and I can't tell you how many times perl's warnings about only-used-once variables or undeclared variables have caught that kind of typing error for me.

Share this post


Link to post
Share on other sites
Seemann

 

Also, I'd like to request an option to have warnings for unrecognized variable aliases. For example, if I use the variable $ON_MISION, currently Sanny will simply add a new global variable for that at the end of the list. However, I'd love an option which will give a warning something like "$ON_MISION is unrecognized and will be added to the global variable space" just in case it was a typo rather than an intended new variable. And since it would be an option, it could be turned off for those who would find it more annoying than useful.

 

I don't know how to do it. How the compiler may distinguish between the correct name and the incorrect one? Maybe the user has written $ON_MISION specially? The only way to do it, make the list of the incorrect names, and then tell to the compiler read them and compare with the names in the code, to find the mistypes. So, more easy and useful is to check your own code more carefully.

The compiler doesn't have to distinguish between correct and incorrect names, it just has to recognize that a particular name is potentially incorrect and let me know so that I can determine if it's correct myself.

 

When you parse the file and come across $FOO you have to make some determination what $FOO means; so you have to either translate $FOO based on a vars.ini entry or increase the global variable space and assign the next variable if it's "new", right? What I am thinking of is if it is treated as new and this warning is enabled, you also add the string 'FOO' to a list and then when the compilation is done you output this list if it's non-empty in a warning dialogue. I can then look at that list and make sure everything on it is something I intended to be a new variable as opposed to a mistyped alias.

 

Since you don't have to declare variables before you use them in mission-coding, that kind of check just seems quite useful to me; maybe I'm just a much worse typist than the average person. tounge2.gif Finding a mistyped variable in your code is often not at all easy in my experience, and I can't tell you how many times perl's warnings about only-used-once variables or undeclared variables have caught that kind of typing error for me.

Seems, you're right. The mistypes can damage all work, I know. But in everything you wrote I've seen the key words: used-once variables or undeclared variables. As you say, gta mission-coding at now do not need for the declaring the variables before using. So, the only way to avoid such problem with the mistypes (as I think) is to check how much times the variable was used. The used-once variables are kind of useless code and possible were used incorrectly. I've offered this way only because I don't know how to find a mistypes in the variable names (for example, how to determine $fooo as mistyped if there's a variable $foo declared in the file vars.ini), so far (and I think it can only confuse if the user wrote this name specially). So, if you really want this feature, I can make the compiler to calculate the variable number of using. If it's equal to 1, so there is an error, either this variable is a kind of trash (used once and forgotten) or used with mistyped name ($ON_MISSION instead of $ONMISSION wink.gif). What do you think?

 

ps. Sanny Builder can display the variables list when you type $ or call it by pressing Ctrl+Space when the cursor is on a variable name. So, you have not to write the variable more that once, just copy them from list (without any mistypes). wink.gif

Edited by Seemann

Share this post


Link to post
Share on other sites
pdescobar

 

Seems, you're right. The mistypes can damage all work, I know. But in everything you wrote I've seen the key words: used-once variables or undeclared variables. As you say, gta mission-coding at now do not need for the declaring the variables before using.

My use of the terms "undeclared variables" and "used-only-once variables" was mainly a way to relate how other kinds of compilers can give a warning similar (but not exactly the same) as what I'm suggesting. Because I know I'm having some trouble explaining it properly. smile.gif

 

 

So, the only way to avoid such problem with the mistypes (as I think) is to check how much times the variable was used. The used-once variables are kind of useless code and possible were used incorrectly. I've offered this way only because I don't know how to find a mistypes in the variable names (for example, how to determine $fooo as mistyped if there's a variable $foo declared in the file vars.ini), so far (and I think it can only confuse if the user wrote this name specially). So, if you really want this feature, I can make the compiler to calculate the variable number of using. If it's equal to 1, so there is an error, either this variable is a kind of trash (used once and forgotten) or used with mistyped name ($ON_MISSION instead of $ONMISSION wink.gif). What do you think?

I still like the idea of a warning (disabled by default of course) listing all the "new" variables, but perhaps you are right that it would be confusing to some (and/or difficult to implement.) A variable counter which will warn when variables are only used once as you propose here is a good compromise, though, and would still be helpful in catching most name mistypes. Of course, it'll probably catch a bunch of once-used variables in Rockstar's original code too but I can live with that. wink.gif

 

 

ps. Sanny Builder can display the variables list when you type $ or call it by pressing Ctrl+Space when the cursor is on a variable name. So, you have not to write the variable more that once, just copy them from list (without any mistypes). wink.gif

Yeah, that feature is often handy (especially the modelID lists), but unless you have the looking depth very high you still sometimes have to type the entire variable or label name rather than being able to copy it from the list.

 

Thanks for considering this and keep up the great work.

Share this post


Link to post
Share on other sites
BMWPower

I opened the b2r3 main.txt and added some things to it, because on my old scm i had some parked cars, i edited the cars and they were more economy and i changed the numbers in the code, then i added my parked cars and when i compile the file, the game crashes at the end of the loading..

 

How can i fix this?

 

10x.

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.

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.


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