This site requires JavaScript, please enable it in your browser!
Greenfoot back
Roshan123
Roshan123 wrote ...

2020/11/15

Csv file

Roshan123 Roshan123

2020/11/15

#
Why csv file only stored 1 user feedback in This scenario ? Does the csv file changes after every update? I made feedback mechanism since 2 weeks I gave some feedback on my own scenario few days ago and yesterday i downloaded it to see how many users gave feedback But their was no feedback except 1 user i.e. xyz (i don't remember his or her name) Even if I don't have my own feedback I think updating the scenario changes the csv file Am I correct or not??? Plz explain why is it happening?
danpost danpost

2020/11/15

#
Updating the scenario should not do anything to the UserrInfo database file for the scenario as it is on a separate server. My demo has been up for 10 days and only has you, PascalFischer and myself and it has not been updated since its has been running on the site. Also, note that feedback will not be saved unless the user is logged onto the site (maybe you weren't when you entered yours). That is not the only reason that it may not be saved -- like, the database server may be down at time of feedback entry.
Roshan123 Roshan123

2020/11/15

#
And why does it stops after giving feedback It doesn't stop on the app after giving feedback
Roshan123 Roshan123

2020/11/15

#
If u will give any feedback on the site then it will pause the scenario
danpost danpost

2020/11/15

#
Roshan123 wrote...
If u will give any feedback on the site then it will pause the scenario
Does it make any difference if you are logged in or not?
Roshan123 Roshan123

2020/11/16

#
Yes, you were right I was logged out at that time...
Roshan123 Roshan123

2020/11/16

#
 if(Greenfoot.isKeyDown("2"))
        {
            String num = Greenfoot.ask("Rate the game (between 0 to 100)");
            String col = Greenfoot.ask("Type for Feedback !!! (maximum characters = 50)");
            if (UserInfo.isStorageAvailable())
            {
                UserInfo me = UserInfo.getMyInfo();
                if (num != null && !"".equals(num)) me.setString(0, num);
                if (col != null && !"".equals(col)) me.setString(1, col);
                me.store();
            }
        }
    
This scenario keeps on asking in the website but not in the app plz tell me the way to fix it
danpost danpost

2020/11/16

#
Roshan123 wrote...
<< Code Omitted >> This scenario keeps on asking in the website but not in the app plz tell me the way to fix it
Please provide source for testing purposes.
Roshan123 Roshan123

2020/11/17

#
Is it okey or do u want the whole scenario code to help me out???
//in world
public void act()
{
  feedback();
}
public void feedback()
{
  if(Greenfoot.isKeyDown("2"))
       {
           String num = Greenfoot.ask("Rate the game (between 0 to 100)");
           String col = Greenfoot.ask("Type for Feedback !!! (maximum characters = 50)");
           if (UserInfo.isStorageAvailable())
           {
               UserInfo me = UserInfo.getMyInfo();
               if (num != null && !"".equals(num)) me.setString(0, num);
               if (col != null && !"".equals(col)) me.setString(1, col);
               me.store();
           }
       }
}
Whole code for feedback mechanism
danpost danpost

2020/11/17

#
Roshan123 wrote...
Is it okey or do u want the whole scenario code to help me out???
I will need to be able to ferret through all the code to see what may be going on.
Roshan123 Roshan123

2020/11/17

#
now its fixed
//in world
//global
byte feedback=0,timer=0;
//in act
if(Greenfoot.isKeyDown("2"))
        {
        feedback=+1;
        }
        if(feedback ==1  )
        {
            timer++;
        }
        if(timer>2)timer=2;
        if(feedback ==1 && timer==1 )
        {
            String num = Greenfoot.ask("Rate the game (between 0 to 100)");
            String col = Greenfoot.ask("Type for Feedback !!! (maximum characters = 50)");
            if (UserInfo.isStorageAvailable())
            {
                UserInfo me = UserInfo.getMyInfo();
                if (num != null && !"".equals(num)) me.setString(0, num);
                if (col != null && !"".equals(col)) me.setString(1, col);
                me.store();
            }
        }
You need to login to post a reply.