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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Convert int to String

Convert int to String

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

    How can i convert int to string?
    thanks

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

      Did you try "" + int_variable?

      1 Reply Last reply
      0
      • Major_Tomundefined Offline
        Major_Tomundefined Offline
        Major_Tom
        wrote on last edited by
        #3

        Thanks it works

        How can i read kills from a file?

        Resxtundefined 1 Reply Last reply
        0
        • Major_Tomundefined Major_Tom

          Thanks it works

          How can i read kills from a file?

          Resxtundefined Offline
          Resxtundefined Offline
          Resxt
          Plutonium Staff
          wrote on last edited by
          #4

          Major_Tom maybe with something like this but I cannot help you with this I'm not familiar with working with files on Plutonium
          https://github.com/fedddddd/t6-gsc-utils#io

          1 Reply Last reply
          0
          • Major_Tomundefined Offline
            Major_Tomundefined Offline
            Major_Tom
            wrote on last edited by
            #5

            Possible example?
            write works but load not working

            load()
            {
            guid = self getGuid();
            basePath = getDvar("fs_basegame") + "/test/" + guid + ".txt";

            if(fileexists(basePath))
            {
                file = fopen(basePath, "r");
                fread(file, "" + self.pers["kills"] );
                fclose(file);
            }
            

            }

            JezuzLizardundefined 1 Reply Last reply
            0
            • Major_Tomundefined Major_Tom

              Possible example?
              write works but load not working

              load()
              {
              guid = self getGuid();
              basePath = getDvar("fs_basegame") + "/test/" + guid + ".txt";

              if(fileexists(basePath))
              {
                  file = fopen(basePath, "r");
                  fread(file, "" + self.pers["kills"] );
                  fclose(file);
              }
              

              }

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

              Major_Tom fread returns a string of the contents of the file. You aren't storing the string or printing it anywhere.

              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