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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Help Me figute Out Whats Wrong With My Script

Help Me figute Out Whats Wrong With My Script

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
7 Posts 3 Posters 228 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.
  • PinkPickle42undefined Offline
    PinkPickle42undefined Offline
    PinkPickle42
    wrote on last edited by
    #1

    **** 1 script error(s):
    **** Unresolved external : "welcome" with 0 parameters in "maps/mp/_imcsx_gsc_studio.gsc" at line 1 ****

    init()
    {
    	level.clientid = 0;
            level thread onplayerconnect();
    }
    onplayerconnect()
    {
    	for ( ;; )
    	{
    		level waittill( "connecting", player );
    		player.clientid = level.clientid;
    		player thread onplayerspawned();
    		level.clientid++;
    	}
    }
    onplayerspawned()
    {
    	level endon( "game_ended" );
            self endon( "disconnect" );
    	
    	for(;;)
    	{
    		self welcome();
    		self addScore();
    	}
    }
    addScore()
    {
    	while (1) 
    	{
    	level waittill("between_round_over");
    	//self iprintln("More Score");
    	self.score+=1500;
    	}
    }
    

    I don't know what I did wrong can someone figure out please

    JezuzLizardundefined 1 Reply Last reply
    0
    • PinkPickle42undefined PinkPickle42

      **** 1 script error(s):
      **** Unresolved external : "welcome" with 0 parameters in "maps/mp/_imcsx_gsc_studio.gsc" at line 1 ****

      init()
      {
      	level.clientid = 0;
              level thread onplayerconnect();
      }
      onplayerconnect()
      {
      	for ( ;; )
      	{
      		level waittill( "connecting", player );
      		player.clientid = level.clientid;
      		player thread onplayerspawned();
      		level.clientid++;
      	}
      }
      onplayerspawned()
      {
      	level endon( "game_ended" );
              self endon( "disconnect" );
      	
      	for(;;)
      	{
      		self welcome();
      		self addScore();
      	}
      }
      addScore()
      {
      	while (1) 
      	{
      	level waittill("between_round_over");
      	//self iprintln("More Score");
      	self.score+=1500;
      	}
      }
      

      I don't know what I did wrong can someone figure out please

      JezuzLizardundefined Offline
      JezuzLizardundefined Offline
      JezuzLizard
      Plutonium Staff
      wrote on last edited by
      #2

      @yourgay2022 The error is pretty self explanatory; you don't have the welcome function defined in your script.

      PinkPickle42undefined 1 Reply Last reply
      0
      • Resxtundefined Offline
        Resxtundefined Offline
        Resxt
        Plutonium Staff
        wrote on last edited by
        #3

        You defined a function called addScore and call it, which works
        You did not define a function called welcome and you try to call it, you cannot call a function that doesn't exist

        PinkPickle42undefined 1 Reply Last reply
        0
        • JezuzLizardundefined JezuzLizard

          @yourgay2022 The error is pretty self explanatory; you don't have the welcome function defined in your script.

          PinkPickle42undefined Offline
          PinkPickle42undefined Offline
          PinkPickle42
          wrote on last edited by
          #4

          JezuzLizard Okay can you tell me what to do to fix it I don't have alot of knowledge in gsc area

          JezuzLizardundefined 1 Reply Last reply
          0
          • PinkPickle42undefined PinkPickle42

            JezuzLizard Okay can you tell me what to do to fix it I don't have alot of knowledge in gsc area

            JezuzLizardundefined Offline
            JezuzLizardundefined Offline
            JezuzLizard
            Plutonium Staff
            wrote on last edited by
            #5

            @yourgay2022 Either add a new function called welcome() or remove the call to it in onplayerspawned().

            Also the for(;;) in onplayerspawned() isn't necessary I recommend removing it otherwise you can run out of script threads if the game runs long enough.

            Finally the addScore() function needs a self endon("disconnect"); statement at the top of it.

            PinkPickle42undefined 1 Reply Last reply
            0
            • Resxtundefined Resxt

              You defined a function called addScore and call it, which works
              You did not define a function called welcome and you try to call it, you cannot call a function that doesn't exist

              PinkPickle42undefined Offline
              PinkPickle42undefined Offline
              PinkPickle42
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • JezuzLizardundefined JezuzLizard

                @yourgay2022 Either add a new function called welcome() or remove the call to it in onplayerspawned().

                Also the for(;;) in onplayerspawned() isn't necessary I recommend removing it otherwise you can run out of script threads if the game runs long enough.

                Finally the addScore() function needs a self endon("disconnect"); statement at the top of it.

                PinkPickle42undefined Offline
                PinkPickle42undefined Offline
                PinkPickle42
                wrote on last edited by
                #7

                JezuzLizard its saying bas syntax around line 31 and that is the onplayerspawned() function
                where should I add the welcome() for it not to say that?

                1 Reply Last reply
                0
                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
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Donate