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.

Newcomers AppGameKit Corner / Problem accessing Integers in record types...

Author
Message
AdamRyan
6
Years of Service
User Offline
Joined: 13th Dec 2017
Location:
Posted: 23rd Jan 2018 19:17
I am following exactly as the manual suggests, but I cannot for the life of me see what must be a silly mistake on my behalf. I can Log strings but not integers....

Here simplified as...


What am I doing wrong?
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 23rd Jan 2018 19:25 Edited at: 23rd Jan 2018 19:28
There are two log functions

One takes a string and sends it to the log output (you want this) and the other function calculates the logarithmic result of a value (integer or float) that is passed to it.


Your last line should be:
Log(str(testRecord.spriteScene)) to force the value to be sent to the log and not find the logarithm of it.


For error logging
https://www.appgamekit.com/documentation/Reference/Error/Log.htm

For maths calculations
https://www.appgamekit.com/documentation/Reference/Core/Log.htm
AdamRyan
6
Years of Service
User Offline
Joined: 13th Dec 2017
Location:
Posted: 23rd Jan 2018 19:31 Edited at: 23rd Jan 2018 21:57
HA HA! Are you serious? OMG.... Thank You, I THOUGHT I WAS GOING CRAZY

I only put the log() function to test if the result of a series of functions came out ok! Should have just ploughed on and not bothered...but anyways I have learnt something!
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 25th Jan 2018 21:41
No problem. Its a questionable idea to have two functions that do different things with the exact same name - so its not suprising this can happen really.

Login to post a reply

Server time is: 2024-04-19 16:42:05
Your offset time is: 2024-04-19 16:42:05