ReiXXX Posted May 21, 2015 Share Posted May 21, 2015 (edited) SO im basically new at coding,im still learning, but THIS CODE, i dont remember where i got it but it was totally ok, so i only change the coords of the cars that would be spawned ingame, click compile, and then there it is... That sanny builder compiler error, saying that there are "Incorrect number of the conditions. 8 max." ... I tryed removing any and/or 's that should not be there, but nothing...I tryed removing all of them, but still nothing... The error message is still there ... It's driving me crazy ... can someone please tell me what i'm doing wrong? Thank you for your time! Here's the code: {$CLEO .cs} //-------------MAIN--------------- 0000: NOP thread "NONAME" :NONAME_12 wait 0 if and Player.Defined($PLAYER_CHAR) 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 243.8939 1960.1425 18.601 radius 200.0 200.0 200.0 jf @NONAME_12 Model.Load(#ARMY) Model.Load(#PATRIOT) Model.Load(#PATRIOT) Model.Load(#PATRIOT) 04ED: load_animation "CAR_CHAT" jump @NONAME_127 :NONAME_127 0A95: enable_thread_saving wait 0 if and Model.Available(#ARMY) Model.Available(#PATRIOT) Model.Available(#PATRIOT) Model.Available(#PATRIOT) else_jump @NONAME_127 if and 04EE: animation "CAR_CHAT" loaded else_jump @NONAME_127 wait 1000 [email protected] = Car.Create(#PATRIOT, -1241.4594, 441.9062, 7.2678 ) Car.Angle([email protected]) = 203.9624 [email protected] = Car.Create(#PATRIOT, -1237.6984, 442.3185, 7.2655 ) Car.Angle([email protected]) = 25.2443 [email protected] = Car.Create(#PATRIOT, -1251.9083, 440.405, 7.2674 ) Car.Angle([email protected]) = 26.2317 [email protected] = Car.Create(#PATRIOT, -1256.6381, 440.2914, 7.2682 ) Car.Angle([email protected]) = 26.0211 [email protected] = Car.Create(#PATRIOT, -1261.4985, 439.229, 7.2656) Car.Angle([email protected]) = 27.5885 [email protected] = Car.Create(#PATRIOT, -1266.662, 439.1667, 7.2588) Car.Angle([email protected]) = 28.0436 [email protected] = Car.Create(#PATRIOT, -1276.4695, 438.3249, 7.264) Car.Angle([email protected]) = 23.7877 [email protected] = Car.Create(#PATRIOT, -1281.306, 438.3305, 7.2625 ) Car.Angle([email protected]) = 24.9344 [email protected] = Car.Create(#PATRIOT, -1286.4642, 437.8707, 7.2646 ) Car.Angle([email protected]) = 28.1315 [email protected] = Car.Create(#PATRIOT, -1291.0763, 437.7442, 7.2677) Car.Angle([email protected]) = 30.7082 [email protected] = Car.Create(#PATRIOT, -1295.9681, 437.5218, 7.2652) Car.Angle([email protected]) = 28.6695 [email protected] = Car.Create(#PATRIOT, -1301.9542, 437.3288, 7.268) Car.Angle([email protected]) = 358.775 [email protected] = Actor.Create(CivMale, #ARMY, 0.0, 0.0, 0.0) Actor.Angle([email protected]) = 0.0 wait 100 072A: put_actor [email protected] into_car [email protected] driverseat 0605: actor [email protected] perform_animation "CAR_SC3_FR" IFP "CAR_CHAT" framedelta 4.0 loop 1 lockX 0 lockY 0 lockF 0 time -1 0605: actor [email protected] perform_animation "CAR_SC3_FR" IFP "CAR_CHAT" framedelta 4.0 loop 1 lockX 0 lockY 0 lockF 0 time -1 wait 1000 Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Car.LockInCurrentPosition([email protected]) = False Actor.LockInCurrentPosition([email protected]) = True 0657: car [email protected] open_door 0 0657: car [email protected] open_door 0 0657: car [email protected] open_door 2 jump @NONAME_711 :NONAME_711 wait 0 if 80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere -1257.4967, 447.6704, 7.1875 radius 200.0 200.0 200.0 jf @NONAME_711 Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Car.Destroy([email protected]) Actor.DestroyInstantly([email protected]) 04EF: release_animation "CAR_CHAT" jump @NONAME_12 0A93: end_custom_thread end_thread Edited May 21, 2015 by ReiXXX Link to comment Share on other sites More sharing options...
ZAZ Posted May 21, 2015 Share Posted May 21, 2015 here is only one condition if and 04EE: animation "CAR_CHAT" loadedelse_jump @NONAME_127so remove the and ReiXXX 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
ReiXXX Posted May 23, 2015 Author Share Posted May 23, 2015 @zaz It worked! Thank you i feel dump cuz i actually thought that i tryed removing all of them :z Now another error message shows up it says: Not enough actual parameters. Expected 8 params. What the hell? :'( Link to comment Share on other sites More sharing options...
Node Posted May 23, 2015 Share Posted May 23, 2015 @zaz It worked! Thank you i feel dump cuz i actually thought that i tryed removing all of them :z Now another error message shows up it says: Not enough actual parameters. Expected 8 params. What the hell? :'( On what line of code does that happen? Post that line. ReiXXX 1 Link to comment Share on other sites More sharing options...
ReiXXX Posted May 23, 2015 Author Share Posted May 23, 2015 (edited) @zaz It worked! Thank you i feel dump cuz i actually thought that i tryed removing all of them :z Now another error message shows up it says: Not enough actual parameters. Expected 8 params. What the hell? :'( On what line of code does that happen? Post that line. here bud: 80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere -1257.4967, 447.6704, 7.1875 radius 200.0 200.0 200.0 EDIT: I removed the commas and voila, no more error messages and the file was compiled successfully! But none of the cars shows up in the game which is a problem I think im giving up on code learning... for today at least! Thank you guys for the help i really do appreciate it ^_^ Edited May 23, 2015 by ReiXXX Link to comment Share on other sites More sharing options...
ZAZ Posted May 23, 2015 Share Posted May 23, 2015 comma failure, look also here here you used classes with arguments in brackets, comma [email protected] = Car.Create(#PATRIOT, -1241.4594, 441.9062, 7.2678 ) here you used opcode version without brackets, without commas80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere -1257.4967 447.6704 7.1875 radius 200.0 200.0 200.0your fail code:80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere -1257.4967, 447.6704, 7.1875 radius 200.0 200.0 200.0 For a bunch of codes can be used CLASSES Read more about classes in Sannybuilder-HELP theme: Coding >> Classes This code by decompiling with writing opcodes 00AB: put_car [email protected] at -1577.942 52.6333 40.0 will by shown by decompiling with without opcodes in this kind: Car.PutAt( [email protected] , -1577.942, 52.6333, 40.0) the meaning of the code is defined by the class entries Car= class-name PutAt= class-member name and member are combined with a dot in the middle [email protected] = class-owner class-owner and parameters are placed in brackets and separated with comma (parameter = needed information for the command) Choose TOOLS, then options in option menu GENERAL you can find the feature to switch between 2 ways for decompiling either decompile by writing opcodes or decompiling without opcodes ReiXXX 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now