Quantcast

Jump to content

» «
Photo

Give n' Take Problem

11 replies to this topic
Hudson101
  • Hudson101

    Like 9 Cans of Shaving Powder

  • New Members
  • Joined: 31 Aug 2014
  • Brazil

#1

Posted 02 September 2014 - 04:11 AM

I'm currently trying to add the Give n' Take code to my main.scm 
 
I keep recieving this error when trying to compile the main.scm:

" Not enough actual parameters. Expected 3 params. "

What can I do ?

OBS: after I change some of the codes (ex:*** 004F: create_thread ££giventake*** to ***create_thread@giventake") it seems bypass the error but i keep getting the not enough thing at several different lines).
I'm stuck on this line:
_________________________________________________________________
:giventake2
0001: wait  0 ms        
07AF: $gang = player $PLAYER_CHAR group
092B: $homie(0) = group $gang member 0    <----------------------- This One. 
092B: $homie(1) = group $gang member 1
092B: $homie(2) = group $gang member 2
092B: $homie(3) = group $gang member 3
092B: $homie(4) = group $gang member 4
092B: $homie(5) = group $gang member 5
092B: $homie(6) = group $gang member 6 
___________________________________________________________________


NcShane
  • NcShane

    Eat apple, aipao!

  • Members
  • Joined: 25 Dec 2013
  • China

#2

Posted 02 September 2014 - 04:33 AM

Change all $homie() to $homie[] because you are using them without specifying type and size.

  • Hudson101 likes this

Hudson101
  • Hudson101

    Like 9 Cans of Shaving Powder

  • New Members
  • Joined: 31 Aug 2014
  • Brazil

#3

Posted 02 September 2014 - 08:43 PM

Thanks for the attention NcShane !!!

What happens is...

The substitution's are working perfectly, that leads me to think that there are multiple substitutions to be made from MrTI code. The question is: Why ?
After i followed your advice the next line to present the same error code was this one:

__________________________________________________________________________________________________

:give3  

04C4: create_coordinate $x $y $z from_actor $PLAYER_ACTOR offset  0.0  1.0  0.0
02CE: $z = ground_z $x $y $z 
00A1: put actor $homie($i,7i) at $x $y $z
0172: $angle = actor $PLAYER_ACTOR z_angle
000B: $angle +=  180.0;; floating-point values                                         <------------------------- THIS ONE ( Not enough actual parameters. Expected 2 params. )
0173: set_actor $homie($i,7i) z_angle_to $angle 
0605: unknown_action_sequence $PLAYER_ACTOR "PASS_RIFLE_PED" "MISC"  4.0  0  0  0  0 -1 
0470: $gun = actor $PLAYER_ACTOR armed weapon unknown
041A: $ammo = actor $PLAYER_ACTOR weapon $gun ammo
0555: remove_weapon $gun from_actor $PLAYER_ACTOR 
0605: unknown_action_sequence $homie($i,7i) "PASS_RIFLE_PLY" "MISC"  4.0  0  0  0  0 -1 
01B2: give_actor $homie($i,7i) weapon $gun ammo $ammo;; Load the weapon model before using this 

___________________________________________________________________________________________

££ = @
() = []
What's next ? I think i should be looking for a code dictionary.


NcShane
  • NcShane

    Eat apple, aipao!

  • Members
  • Joined: 25 Dec 2013
  • China

#4

Posted 03 September 2014 - 04:36 AM

;; should be //      You should check the source you get opcodes from..

  • Hudson101 likes this

Hudson101
  • Hudson101

    Like 9 Cans of Shaving Powder

  • New Members
  • Joined: 31 Aug 2014
  • Brazil

#5

Posted 03 September 2014 - 04:57 AM Edited by Hudson101, 03 September 2014 - 05:03 AM.


Can't thank you enough, NcShane.
But as i see this would requive a total conversion on codes, and I don't want to bother anyone with it anymore, guess i'll just go by reading some tutorials and trying a lil' trial and error.
Got stuck now on this:
______________________________________________________________
 

:SYND4_3650
if 
else_jump @SYND4_3672     <----- (Incorrect number of the conditions.)
wait 0 
jump @SYND4_3650 

_______________________________________________________________

If you could treat it as a last gift I would be very pleased ! hahahaha. But seriously, thanks for the patience ! 

EDIT: Just noticed that ain't part of the MOD's codes. Sanny Builder problem maybe ?

 

NcShane
  • NcShane

    Eat apple, aipao!

  • Members
  • Joined: 25 Dec 2013
  • China

#6

Posted 03 September 2014 - 12:08 PM

You need tutorials! Seriously. :/ Then these all aren't problems.


ED-E
  • ED-E

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • United-Kingdom

#7

Posted 03 September 2014 - 01:24 PM Edited by ChopTheDog., 03 September 2014 - 01:24 PM.

 

Can't thank you enough, NcShane.
But as i see this would requive a total conversion on codes, and I don't want to bother anyone with it anymore, guess i'll just go by reading some tutorials and trying a lil' trial and error.
Got stuck now on this:
______________________________________________________________
 

:SYND4_3650
if 
else_jump @SYND4_3672     <----- (Incorrect number of the conditions.)
wait 0 
jump @SYND4_3650 

_______________________________________________________________

If you could treat it as a last gift I would be very pleased ! hahahaha. But seriously, thanks for the patience ! 

EDIT: Just noticed that ain't part of the MOD's codes. Sanny Builder problem maybe ?

 

 

The "Incorrect number of conditions" error appears because you've not actually given your script any conditions.

 

The minimum number of conditions is 1.

The maximum is 8.

 

I can't understand how you've ended up at this point because the IF statement is, to me, pretty straight forward.

:SYND4_3650
if 
//If what? fresh air is true? fresh air is false?
else_jump @SYND4_3672 //I can't jump when the conditions above me are false because there aren't any conditions to check!
wait 0 
jump @SYND4_3650 
  • Hudson101 likes this

Hudson101
  • Hudson101

    Like 9 Cans of Shaving Powder

  • New Members
  • Joined: 31 Aug 2014
  • Brazil

#8

Posted 03 September 2014 - 02:50 PM Edited by Hudson101, 03 September 2014 - 03:16 PM.

What I can't understand is why are these codes lacking this kind of info when I never edited any of that, and if this information is not there by default, how does the game runs without any problem? Why is the file compiled originally with those kind of incoherences ?

Seems to me i'll need to read a lot fo fix all the problems at the deafult codes just for adding a mod, by the time I'm done there will be a GTA 13.

___________________

EDIT N°1 - Nevermind, i just deleted the "if" condition and it compiled. Let's see for how long that shall go.
                  Thank you very much, both of you ! 


ED-E
  • ED-E

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • United-Kingdom

#9

Posted 03 September 2014 - 03:17 PM

What I can't understand is why are these codes lacking this kind of info when I never edited any of that, and if this information is not there by default, how does the game runs without any problem? Why is the file compiled originally with those kind of incoherences ?

Seems to me i'll need to read a lot fo fix all the problems at the deafult codes just for adding a mod, by the time I'm done there will be a GTA 13.

___________________

EDIT N°1 - Nevermind, i just deleted the "if" condition and it compiled. Let's see for how long that shall go.
                  Thank you very much, both of you ! 

 

I believe the code you found was made using Mission Builder not Sanny Builder thus the code is incompatible with Sanny Builder.


Hudson101
  • Hudson101

    Like 9 Cans of Shaving Powder

  • New Members
  • Joined: 31 Aug 2014
  • Brazil

#10

Posted 03 September 2014 - 03:34 PM

Let's hope "C.R.A.S.H" won't get me later in the evening.


ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#11

Posted 03 September 2014 - 03:51 PM Edited by ZAZ, 03 September 2014 - 03:52 PM.

As ChopTheDog said, MrTi wrote the script with BW MB
Sannybuilder have a function for converting: click on "tools", "code converter", "MB -> SB"
I already did that and posted the script here
But take care, it's for cleo library
to add it into main.scm needs only to remove the cleo directive {$CLEO .cs} at script beginn and add a start label instead

Hudson101
  • Hudson101

    Like 9 Cans of Shaving Powder

  • New Members
  • Joined: 31 Aug 2014
  • Brazil

#12

Posted 04 September 2014 - 01:02 AM

Thanks for the heads-up. Will try it in case mine non cleo starts to crumble.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users