Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] platform = GetDeviceName ( ) is returning an error

Author
Message
BHoltzman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 9th Sep 2019 04:43
Hi Guys,

This seems like a bug. I copied the line

platform = GetDeviceName ( )

from the documentation Home->Examples->0_core.htm in AppGameKit Studio into my project main.agc right before the do loop. Compiling returns main.agc:24:Error: Cannot assign String to Integer.

I've tried changing the lvalue name to dn and DeviceName just in case there was already a variable in scope with the same name, but there was not change in the error message from the compiler. Let me know if you think this is a bug that should be reported.

The author of this post has marked a post as an answer.

Go to answer

Qube_
10
Years of Service
User Offline
Joined: 21st Oct 2014
Location: Omnipresent
Posted: 9th Sep 2019 04:51
This post has been marked by the post author as the answer.
BHoltzman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 9th Sep 2019 04:58
Thanks for the help. I haven't used AppGameKit basic for a while. I eventually found that putting platform$ = GetDeviceName() got past the error. But then a message box popped up showing the following message:



So I guess that means that the documentation needs to be updated?

Attachments

Login to view attachments
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 9th Sep 2019 12:37
The very first line of the documentation states that the command is deprecated. So no, it is not a bug and no, the help files do not need updating.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 9th Sep 2019 12:37 Edited at: 9th Sep 2019 12:39
Quote: "So I guess that means that the documentation needs to be updated?"


https://www.appgamekit.com/documentation/Reference/Core/GetDeviceName.htm

It already tells you that in the documentation,

Quote: "
GetDeviceName
Description

This command is deprecated, please use GetDeviceBaseName and GetDeviceType instead. Returns a string containing the name of the current platform. e.g. "windows" or "bada". When dealing with iOS more information is returned e.g. on iPad 1 "ios|iPad1,1" and on iPod 2nd gen: "ios|iPod2,1" and on iPhone 3G: "ios|iPhone1,2". The first number is the major model number, the second is the minor model number. "


OOPS, posted this the same time as Scraggle. lol

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-11-22 17:19:08
Your offset time is: 2024-11-22 17:19:08