Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (howardR), 650 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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