BASIC

Author Topic: NetWebGet - Bad Access - iPhone  (Read 2496 times)

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
NetWebGet - Bad Access - iPhone
« on: 2010-Apr-06 »
Hi there,

When I use command 'NetWebGet' i get 'BAD ACCESS' on iPhone (it works well on pc).

Can anyone help me?

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10661
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NetWebGet - Bad Access - iPhone
« Reply #1 on: 2010-Apr-06 »
post the exact syntax and path (for the local file), please.

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: NetWebGet - Bad Access - iPhone
« Reply #2 on: 2010-Apr-06 »
Hi Gernot,

The sintax is:

- GLOBAL SERVERURL$ = "http://proyectos.signo-net.com";
- LOCAL path$ = "/exodus/api/iphone-1-0-0.php?id=" + id;
- NETWEBGET(SERVERURL$, path$, 80, "");

What can be the problem?

Thanks in advance Gernot!

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10661
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NetWebGet - Bad Access - iPhone
« Reply #3 on: 2010-Apr-06 »
you can't write to that directory.
Use PLATFORMINFO$("DOCUMENTS") or read to a string with NETWEBGET$()

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: NetWebGet - Bad Access - iPhone
« Reply #4 on: 2010-Apr-06 »
Hi Gernot,

Thanks for your fast response, I know about the use of platforminfo$, but what parameter on NetWebGet$, indicates where to write to?
In other hand, i don't want to save the response anywhere, it is only to insert data on DB.

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1751
    • View Profile
    • Homepage
Re: NetWebGet - Bad Access - iPhone
« Reply #5 on: 2010-Apr-06 »
The last parameter in the call is the location of the file to write to. I can imagine that a filename of "" might give troubles on some platforms. If you don't care about the downloaded page, just use NETWEBGET$ instead, that will download into a string instead of writing to the harddrive. I believe that you can set max length to download too.

Offline fjsantosb

  • Dr. Type
  • ****
  • Posts: 258
    • View Profile
    • Tip Tap Games - iPhone, iPad and iPod Touch Games
Re: NetWebGet - Bad Access - iPhone
« Reply #6 on: 2010-Apr-07 »
Hi Moru,

Thanks! That exactly what i was looking for! (It was my mistake i use 'NETWEBGET' without '$'!).  =D
It's working now!

Thanks for your response!

King Regards, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Offline Ozden79

  • Mr. Polyvector
  • ***
  • Posts: 121
    • View Profile
Re: NetWebGet - Bad Access - iPhone
« Reply #7 on: 2010-Apr-08 »
Hi There,

I want to download a few files from my server to IPhone, basically a definition file and a few image files where I'll use to show the upcoming games. Can I use NETWEBGET for that as it seems they are used to download text? Also, is there 2 different commands as NETWEBGET$ and NETWEBGET or am I wrong?

Thanks,

Özden

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10661
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: NetWebGet - Bad Access - iPhone
« Reply #8 on: 2010-Apr-08 »
Yup.
Just download with NETWEBGET to the directory PLATFORMINFO$("DOCUMENTS").
The NETWEBGET$ (with dollar) downloads to a string instead of a file.

Offline Ozden79

  • Mr. Polyvector
  • ***
  • Posts: 121
    • View Profile
Re: NetWebGet - Bad Access - iPhone
« Reply #9 on: 2010-Apr-08 »
Great, thanks...