Closed Aldrin-John-Olaer-Manalansan closed 2 months ago
I replied in the other ticket, copying my answer here:
In new SBL modes all opcodes have their arguments in the original conventional order: all inputs first, outputs after. 0AA2 had their params re-ordered in legacy SA 1.0 mode.
Quick solution: don't use opcode syntax in new SBL mode. Sanny will correctly arrange params in all commands:
{$CLEO}
nop
if not 0@ = load_dynamic_library "Kernel32.dll"
then terminate_this_custom_script
end
terminate_this_custom_script
I replied in the other ticket, copying my answer here:
In new SBL modes all opcodes have their arguments in the original conventional order: all inputs first, outputs after. 0AA2 had their params re-ordered in legacy SA 1.0 mode.
Quick solution: don't use opcode syntax in new SBL mode. Sanny will correctly arrange params in all commands:
{$CLEO} nop if not 0@ = load_dynamic_library "Kernel32.dll" then terminate_this_custom_script end terminate_this_custom_script
Thanks for your fast reply, I appreciate the explanation.
This Means that this mode will apply to all scripts that uses opcodes right? Like all their parameters needs to be re-ordered? For my entire life coding cleo scripts I always use opcodes. I have like 100 scripts and all of them have opcodes. It's like you're saying that I need to modify all of them 😢 based on what the Opcode Search Tool opcode syntax:
Do we have an option that makes the syntax for this parameter arrangement backward compatible?
You can keep using SA 1.0 edit mode to compile old scripts.
I recommend write new scripts in SBL mode. You can also disassemble old scripts using new SBL mode to get params in right order, but you will lose the comments/var names
You can keep using SA 1.0 edit mode to compile old scripts.
I recommend write new scripts in SBL mode. You can also disassemble old scripts using new SBL mode to get params in right order, but you will lose the comments/var names
In this choices:
According to this: Does this mean that SA 1.0 edit mode is not available anymore?
I was talking about new SBL modes in SB 4.0
I don't understand how to compile Old Scripts using SA 1.0 edit mode, or how to change to SA 1.0 edit mode.
But so it seems, at the end of the day I'll be migrating the syntax of my scripts to SB 4.0 SBL mode.
I don't understand how to compile Old Scripts using SA 1.0 edit mode, or how to change to SA 1.0 edit mode.
But so it seems, at the end of the day I'll be migrating the syntax of my scripts to SB 4.0 SBL mode.
Switch to GTA SA v1.0 mode using menu in the bottom right corner, then compile. It's available both in 3.X and 4.0 versions
Sorry for Replying Late. Thank you for the clarification, I realized that this option pops up when I use an SBL Syntax:
Since this topic is in conclusion to the new SBL Syntax. I want to confirm some things that don't seemed to be working for me. Can you explain why this is not working?
{$CLEO}
{$USE file}
0000:
if {8AF0:} not 0@ = read_int_from_ini_file "cleo\myfile.ini" {section} "thissection" {key} "thatkey"
then 0@ = 131071
end
0A93: terminate_this_custom_script
nvm, it must be like this:
{$CLEO}
{$USE file}
0000:
if not {8AF0:} 0@ = read_int_from_ini_file "cleo\myfile.ini" {section} "thissection" {key} "thatkey"
then 0@ = 131071
end
0A93: terminate_this_custom_script
I have a script that uses foreign functions from MSAPI, but they are not working. By migrating to Cleo 5, I quickly identified the problem, since this error message shows up:
I have come up with a very simple test script that only tries to execute Opcode 0AA2 with conditions:
Decompiling with Sanny builder 3:
Decompiling with Sanny builder 4:
As you can see, the input parameter and the output parameter got shuffled, it might have something to do with the way opcode parameters are sorted in sanny builder configuration, I don't know which configuration file it is since 4.0.0 release seems to be pretty big and there are so many changes, especially with its new configuration files. How to fix this?