Results 1 to 10 of 15

Thread: MODDING : How to make virtual money.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Code:
        if(fid==0)
        {
            argcount=fReadLn(fid);
            linenum=0;
            while(argcount>0)
            {
                if(linenum>0 && argcount==2)
                    if(guid==int(fGetArg(fid,0)))
                        self.money=int(fGetArg(fid,1));
                
                argcount=fReadLn(fid);
                linenum++;
            }
        }
        else
            self.money=startMoney;
    Please replace the first check with a check for -1 instead of 0. So, if(fid != -1)

    Also, this looks like the reading file function is ripped DIRECTLY out of my account system:

    Code:
    	//MY code.
    	argcount=freadln(fid);
    	linenum=0;
    	self.stats=[];
    	while(argcount!=0)
    	{
    		if(linenum>0)
    			self.stats[fgetarg(fid,0)]=int(fgetarg(fid,1));
    		argcount=freadln(fid);
    		linenum++;
    	}
    No worries, please just add credits and it will be fine.
    Last edited by IzNoGoD; 24th November 2012 at 10:30.

  2. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (24th November 2012)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •