Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. [Support] Help Fixing Code

[Support] Help Fixing Code

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
17 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Sorex Sorex

    JARDASs said in [Support] Help Fixing Code:

    self.healthbarhudelems[self.healthbarkeys[i]].destroy();

    self.healthbarhudelems[self.healthbarkeys[i]].destroy();

    line 206

    ThrzModdingRMT Offline
    ThrzModdingRMT Offline
    ThrzModdingRMT
    wrote on last edited by
    #5

    Sorex Still not working 😞

    1 Reply Last reply
    0
    • Sorex Offline
      Sorex Offline
      Sorex
      Contributor
      wrote on last edited by
      #6

      ThrzModdingRMT How di you fix it? The error is that line because you are calling a function dircelty related to an object. GSC don't allow you to do that in this way

      ThrzModdingRMT 1 Reply Last reply
      0
      • Sorex Sorex

        ThrzModdingRMT How di you fix it? The error is that line because you are calling a function dircelty related to an object. GSC don't allow you to do that in this way

        ThrzModdingRMT Offline
        ThrzModdingRMT Offline
        ThrzModdingRMT
        wrote on last edited by
        #7

        Sorex
        I did not fixed but if u could help me i will apreciate

        1 Reply Last reply
        0
        • Sorex Offline
          Sorex Offline
          Sorex
          Contributor
          wrote on last edited by
          #8

          ThrzModdingRMT Send me the code and i will look at it

          1 Reply Last reply
          0
          • ThrzModdingRMT Offline
            ThrzModdingRMT Offline
            ThrzModdingRMT
            wrote on last edited by
            #9

            https://pastebin.com/jXcHknh4
            Source Code

            	else if(option == 9)
            	{
            		if(stoggle(9))
            		{
            			self thread loop_handler(9);
            			break;
            		}
            		if(!isdefined(self.healthbarhudelems))
            		{
            			return;
            		}
            		for(i = 0; i < self.healthbarkeys.size; i++)
            		{
            			self.healthbarhudelems[self.healthbarkeys[i]].bgbar destroy();
            			self.healthbarhudelems[self.healthbarkeys[i]].bar destroy();
            			self.healthbarhudelems[self.healthbarkeys[i]] destroy();
            		}
            	}
            

            I didnt find any solution cause im having this same error similiar code in another script and i want so bad to fix it but i cant

            1 Reply Last reply
            0
            • Sorex Offline
              Sorex Offline
              Sorex
              Contributor
              wrote on last edited by
              #10

              ThrzModdingRMT
              GSC studio give error when you use self.healthbarkeys[i] as index for an array, but you can save it on a var an use it as an index. Probably its just an issue related to the gsc syntax of GSC Studio. You should be able to compile it with the compiler in both way

              else if(option == 9)
              	{
              		if(stoggle(9))
              		{
              			self thread loop_handler(9);
              			break;
              		}
              		if(!isdefined(self.healthbarhudelems))
              		{
              			return;
              		}
              		for(i = 0; i < self.healthbarkeys.size; i++)
              		{
              			index = self.healthbarkeys[i];
              			self.healthbarhudelems[index].bgbar destroy();
              			self.healthbarhudelems[index].bar destroy();
              			self.healthbarhudelems[index] destroy();
              		}
              	}
              
              ThrzModdingRMT 1 Reply Last reply
              0
              • Sorex Sorex

                ThrzModdingRMT
                GSC studio give error when you use self.healthbarkeys[i] as index for an array, but you can save it on a var an use it as an index. Probably its just an issue related to the gsc syntax of GSC Studio. You should be able to compile it with the compiler in both way

                else if(option == 9)
                	{
                		if(stoggle(9))
                		{
                			self thread loop_handler(9);
                			break;
                		}
                		if(!isdefined(self.healthbarhudelems))
                		{
                			return;
                		}
                		for(i = 0; i < self.healthbarkeys.size; i++)
                		{
                			index = self.healthbarkeys[i];
                			self.healthbarhudelems[index].bgbar destroy();
                			self.healthbarhudelems[index].bar destroy();
                			self.healthbarhudelems[index] destroy();
                		}
                	}
                
                ThrzModdingRMT Offline
                ThrzModdingRMT Offline
                ThrzModdingRMT
                wrote on last edited by
                #11

                Sorex
                ![0_1627129592119_ss.JPG](Uploading 100%)

                how can save it on a var an use it as an index?
                sry man i dont understand anything of coding xDD

                1 Reply Last reply
                0
                • Sorex Offline
                  Sorex Offline
                  Sorex
                  Contributor
                  wrote on last edited by
                  #12

                  ThrzModdingRMT I sended to you the code...

                  ThrzModdingRMT 2 Replies Last reply
                  0
                  • Sorex Sorex

                    ThrzModdingRMT I sended to you the code...

                    ThrzModdingRMT Offline
                    ThrzModdingRMT Offline
                    ThrzModdingRMT
                    wrote on last edited by
                    #13

                    Sorex
                    oh..
                    i tought u were explaining me ty btw 🐶

                    1 Reply Last reply
                    0
                    • Sorex Sorex

                      ThrzModdingRMT I sended to you the code...

                      ThrzModdingRMT Offline
                      ThrzModdingRMT Offline
                      ThrzModdingRMT
                      wrote on last edited by
                      #14

                      Sorex
                      bro it worked but ...

                      			wait(0.01);
                      		}
                      		self sgetmenu().currentmenu = -1;
                      		updatemenu();
                      		hud = self createfontstring("objective", 2);
                      		hud settext("^2Hold [{+gostand}] ^3and [{+usereload}] to ^2Respawn");
                      		hud.x = 0;
                      		hud.y = 0;
                      		hud.alignx = hud;
                      		hud.aligny = hud;
                      		hud.horzalign = hud;
                      		hud.vertalign = hud;
                      		hud.color = 1, 1, 1;
                      		hud.alpha = 1;
                      		hud.glowcolor = 1, 1, 1;
                      		hud.glowalpha = 0;
                      		hud.sort = 5;
                      		hud.archived = 0;
                      

                      IM ALMOST IN THE END 🙂

                      lmao.JPG

                      1 Reply Last reply
                      0
                      • Sorex Offline
                        Sorex Offline
                        Sorex
                        Contributor
                        wrote on last edited by
                        #15

                        ThrzModdingRMT for rgb color you have to write (number1, number2, number3) so hus.color = 1,2,3; its wrong because hud.color is 1 but 2 and 3 are not assigned to anything. Change it with hus.color = (1,1,1);

                        ThrzModdingRMT 2 Replies Last reply
                        0
                        • Sorex Sorex

                          ThrzModdingRMT for rgb color you have to write (number1, number2, number3) so hus.color = 1,2,3; its wrong because hud.color is 1 but 2 and 3 are not assigned to anything. Change it with hus.color = (1,1,1);

                          ThrzModdingRMT Offline
                          ThrzModdingRMT Offline
                          ThrzModdingRMT
                          wrote on last edited by
                          #16

                          Sorex
                          So its the same for

                          ---- hud.glowcolor = 1, 1, 1; --- 
                          

                          hud.glowcolor = (1,1,1);

                          1 Reply Last reply
                          0
                          • Sorex Sorex

                            ThrzModdingRMT for rgb color you have to write (number1, number2, number3) so hus.color = 1,2,3; its wrong because hud.color is 1 but 2 and 3 are not assigned to anything. Change it with hus.color = (1,1,1);

                            ThrzModdingRMT Offline
                            ThrzModdingRMT Offline
                            ThrzModdingRMT
                            wrote on last edited by
                            #17

                            Sorex
                            I finally ended but when it compiles it doesnt show anything and the file compiled does not show up

                            1 Reply Last reply
                            0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Unread 0
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Donate