|
 |
|
|
|
|
|
GTA Modification Forums
cleo file structure
 |
|
 |
| |
fastman92  |
|
фастман92 | ف

Group: Members
Joined: Jul 28, 2009


|
| QUOTE (Bad.boy! @ Monday, Apr 30 2012, 11:55) | I am quiet stubborn*, and continue working on this compiler.
Does anyone know how high a number must be to use 8bit, 16bit or 32bit ints? What is the highest value 8, 16 and 32bit can handle?
*Google translate, don't know if it's the word I mean |
Calculate it yourself 2^8 - 1 = ? 2^16 -1 = ? 2^32 -1 = ? ^ is power sign. For example 2 ^ 3 = 2*2*2 = 8 Look in Google what is binary system 10101011111010101010110100101 Seriously, leave it.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Bad.boy!  |
Posted: Wednesday, May 2 2012, 10:43
|
SA modder

Group: Members
Joined: Jun 20, 2010


|
They made a repeat until loop, but R* code jumps to an other label and jumps back (I think): | CODE | WHILE NOT HAS_MODEL_LOADED counter_create_car WAIT 0 PRINT_NOW LOADCAR 100 1 //"Loading vehicle, press pad2 leftshoulder1 to cancel" IF IS_BUTTON_PRESSED PAD2 LEFTSHOULDER1 //++ counter_create_car GOTO next_carzzz ENDIF ENDWHILE |
So I should make an other label and then jump back? EDIT: New Code | CODE | public static void OpcodeWhile(string lijn, int index, bool flag) { if (flag == false) { Main.index--; index--; int index5 = 0;
for (int i = index; i > 0; i--) { if (Main.Script[i] != null) { int Temp = Main.Script[i].Length; Temp /= 2; index5 += Temp; } }
index5 *= -1; string Hex3 = "4D00" + Variables.Signed32BitInt(index5);
bool isNot = false; int index2 = 0; string Opcode = ""; string[] opcode = lijn.Split(new Char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
if (!lijn.Contains("NOT")) { foreach (string woord in opcode) { index2++; if (index2 == 2) { Opcode += woord; }
if (index2 == 3) { Opcode += " " + woord; } } } else { isNot = true; foreach (string woord in opcode) { index2++; if (index2 == 3) { Opcode += woord; }
if (index2 == 4) { Opcode += " " + woord; } } }
int index4 = 0; foreach (string ding in Main.While) { if (ding != null) { if (ding.Length > 1) { index4++; } } }
Main.FindOpcode(Opcode, index, true); string Hex = ""; if (isNot == true) { int index3 = 0; string[] Tempvar = Regex.Split(Main.While[index4], "");
foreach (string nummer in Tempvar) { index3++; if (index3 == 4) { Hex += "8"; } else { Hex += nummer; } } } else { Hex = Main.While[index4]; }
Main.While[index4] = Hex + Hex3; Main.CurrentWhile[index4] = "Huidige"; } else { Main.Error = true; } } public static void OpcodeEndWhile(string lijn, int index, bool flag) { if (flag == false) { int i = -1;
foreach (string line in Main.CurrentWhile) { if (line != null) { if (line == "Huidige") { i++; } } }
string Hex = Main.While[i]; Main.CurrentWhile[i] = null; Main.Script[index] = Hex; Main.index++; } else { Main.Error = true; } } | This post has been edited by Bad.boy! on Thursday, May 3 2012, 08:10
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Link2012  |
Posted: Thursday, May 10 2012, 15:46
|
Wut?

Group: Members
Joined: Jan 30, 2011


|
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?
This post has been edited by Link2012 on Thursday, May 10 2012, 15:50
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(3) 1 [2] 3
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|