Jump to content


Photo

clockwork help needed please.


  • Please log in to reply
6 replies to this topic

#1 Morpheas

Morpheas

    GMC Member

  • New Member
  • 66 posts
  • Version:GM8

Posted 30 April 2012 - 04:25 PM

i have a problem with the retrieval of stats from clockwork.
i can submit but not to get any highscore.
in a controller i have this code.
STEP EVENT
if wave=11 then global.endgame=true
if instance_number(obj_enemy_parent)=0 and global.endgame=true
{
    score=score+wave+money-300+(lives*100);
    room_persistent = false;
    instance_create(0,0,obj_score1)
}

and in obj_score1 i have this.
CREATE EVENT
{
place = cw_highscore_create(global.username, score, "");
cw_highscore_get(100,"",0); //load the first 100 highscores
show_message("You got " + string(place) + "th place!");
//did we actually retrieve at least one highscore?
if (cw_highscore_count() > 0)
{
    //announce the name and score of the top player
    show_message("The top player is " + cw_highscore_player(1));
    show_message("Their score is " + cw_highscore_score(1));
    splash_set_position(1,1)
    splash_set_size(800,600)
    splash_show_web("http://www.ioannisgames.com/test1.1111111111111.html","") 
}
else
{
    show_message("No highscores were retrieved.");
    splash_set_position(1,1)
    splash_set_size(800,600)
    splash_show_web("http://www.ioannisgames.com/test1.1111111111111.html","") 
}
room_goto(roommenu0);
}
in the debug messages it tells me this
Failed to retrieve token: 102
Failed to create stat: 101 'Action Complete'
Failed to retrieve highscore: 103 'Action Complete, Information Retrieved'
Failed to retrieve token: 102
Failed to create highscore: 101 'Action Complete'
You must load the highscores with cw_highscore_get before calling cw_highscore_count

even if i remove the the go to room command the same result

Edited by Morpheas, 30 April 2012 - 04:38 PM.

  • 0

#2 Morpheas

Morpheas

    GMC Member

  • New Member
  • 66 posts
  • Version:GM8

Posted 01 May 2012 - 07:54 AM

please guys some help here i have sent mails to clockwork and no1 is answering me.
  • 0

#3 Morpheas

Morpheas

    GMC Member

  • New Member
  • 66 posts
  • Version:GM8

Posted 03 May 2012 - 07:36 AM

come on guys no1?
  • 0

#4 Morpheas

Morpheas

    GMC Member

  • New Member
  • 66 posts
  • Version:GM8

Posted 03 May 2012 - 04:12 PM

ole = cw_highscore_create(global.username,score,"");
show_message("You got " + string(ole) + "th place!");
cw_highscore_get(10,"",0);
if (cw_highscore_count() > 0)
{
    show_message("The top player is " + cw_highscore_player(1));
    show_message("Their score is " + cw_highscore_score(1));
    room_goto(roommenu0);
    splash_set_position(1,1);
    splash_show_web("http://www.ioannisgames.com/test1.1111111111111.html","");
}
else
{
    show_message("No highscores were retrieved.");
    room_goto(roommenu0); 
    splash_set_position(1,1);
    splash_show_web("http://www.ioannisgames.com/test1.1111111111111.html","");
}

latest code still i cant retrieve the highscores
guys please 17000 the topic clockwork has been read no1 knows how to fix this if it is possible to get fixed?
  • 0

#5 Lemon Pie

Lemon Pie

    GMC Member

  • GMC Member
  • 194 posts

Posted 03 May 2012 - 04:30 PM

Call the highscores first, then manipulate them, as part of your error stated needed to be done. The rest of the problem lies elsewhere, not in the code you've shown.
  • 0

#6 Morpheas

Morpheas

    GMC Member

  • New Member
  • 66 posts
  • Version:GM8

Posted 03 May 2012 - 05:25 PM

Call the highscores first, then manipulate them, as part of your error stated needed to be done. The rest of the problem lies elsewhere, not in the code you've shown.

what do u mean exactly?do u mean the highscore get command?call it before i place my high score?
explain in a little i didn't understand the Call the highscores first, then manipulate them,
  • 0

#7 Morpheas

Morpheas

    GMC Member

  • New Member
  • 66 posts
  • Version:GM8

Posted 04 May 2012 - 06:28 AM

i don't use anywhere else cw code and this is my latest code
any1 to help?:)
cw_highscore_get(10,"",0);
ole = cw_highscore_create(global.username,score,"");
show_message("You got " + string(ole) + "th place!");
if (cw_highscore_count() > 0)
{
    show_message("The top player is " + cw_highscore_player(1));
    show_message("Their score is " + cw_highscore_score(1));
    room_goto(roommenu0);
    splash_set_position(1,1);
    splash_show_web("http://www.ioannisgames.com/test1.1111111111111.html","");
}
else
{
    show_message("No highscores were retrieved.");
    room_goto(roommenu0); 
    splash_set_position(1,1);
    splash_show_web("http://www.ioannisgames.com/test1.1111111111111.html","");
}

in the debug i get

Failed to retrieve highscore: 103 'Action Complete, Information Retrieved'
Failed to retrieve token: 102
Failed to create highscore: 101 'Action Complete'

all the other code is in the scripts of the ClockworkSDK_v_0_1_8
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users