Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (EternallyCurious, AndrewAMD, TipmyPip, Quad), 902 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: online scoreboard help [Re: Realspawn] #440813
05/02/14 18:57
05/02/14 18:57
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Okay I've looked into this more - I've noted that it is not the splitter. the splitter works fine.

It seems to be the webscore_send:
I know this because If I open the .txt file stored in my server after its been created the score is 50 and the time is 50.

50 = stage 50.

Code:
var webscore_send(STRING* name,STRING* scores_file,STRING* score,STRING* time)
{
if(!load_web_dll()) return -1;
STRING* send=str_create(WEBSCORE_SCRIPT);
str_cat(send,"?action=add&key=");
str_cat(send,webscore_clean(WEBSCORE_KEY));
str_cat(send,"&name=");
str_cat(send,webscore_clean(name));
str_cat(send,"&scores_file=");
str_cat(send,webscore_clean(scores_file));
str_cat(send,"&score=");
str_cat(send,webscore_clean(score));
str_cat(send,"&time=");
//str_cat(send,time); // This is the original line
str_cat(send,webscore_clean(time));//I tried to replace it with this
var r=DownloadToFile(_chr(send),_chr("score_temp"));
if(!r) return -2;
STRING* res=file_get_contents("score_temp");
if(str_cmp(res,"")) r=-2;
else if(str_cmp(res,"0") || str_cmp(res,"2")) r=0;
else if(str_cmp(res,"1")) r=-3;
else r=-4;
file_delete("score_temp");
return r;
}



Perhaps someone else can see the error here?


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: online scoreboard help [Re: DLively] #440814
05/02/14 19:15
05/02/14 19:15
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
I figured it out laugh

When sending strings, str_for_num should be done prior to the struct wink


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1