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 / Help with arrays

Author
Message
Hiddenworlds225
7
Years of Service
User Offline
Joined: 16th Jul 2017
Location:
Posted: 27th Jul 2017 01:39
I have anther question : How can you make an array work? I built an code but it keeps saying its not defined even though it is

but this is an script that im using it for. But when i run it it says it is not Defined (Though it is incomplete, once i have the array fixed it will be finished) . I'll look on the forums to fix this array. But if i dont find any answers this is my last resort.
Thanks for the help though!

function GetVirtualCordinates(Virtx,Virty)
spriteWidith = 32
spriteHeight = 32

for xpos=0 to 20
Blockx[xpos] = Blockx[xpos - 1] + spriteHeight


next xpos
endfunction
Hiddenworlds225
7
Years of Service
User Offline
Joined: 16th Jul 2017
Location:
Posted: 27th Jul 2017 01:46
Whoever is reading this i dont have javascript for my browser so for some reason i cant see this post
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 27th Jul 2017 12:29
did you define "Blockx" as global?
Hiddenworlds225
7
Years of Service
User Offline
Joined: 16th Jul 2017
Location:
Posted: 27th Jul 2017 20:48
yes I did
Hiddenworlds225
7
Years of Service
User Offline
Joined: 16th Jul 2017
Location:
Posted: 28th Jul 2017 14:19 Edited at: 28th Jul 2017 14:20
I figured out why. it was not set properly

Login to post a reply

Server time is: 2024-11-22 07:35:55
Your offset time is: 2024-11-22 07:35:55