The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script For loop

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old May 23rd, 2019 (11:47 AM).
TubbieRanger TubbieRanger is offline
UNprofessional ROMhacker
 
Join Date: Aug 2017
Posts: 5
How do I write a for loop? I looked at some scripting tutorials but I couldn't find out how.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 23rd, 2019 (12:10 PM).
Koople's Avatar
Koople Koople is offline
 
Join Date: Nov 2016
Nature: Relaxed
Posts: 88
Here is a script snippet that might help:
Code:
setvar 0x8000 0  //initialize loop counter
goto @loop

#org @loop
compare 0x8000 10
if 0x1 goto @exit_loop
// do your loop stuff here
addvar 0x8000 1
goto @loop
That will loop through the section "#org @loop" 10 times. Hope this helps!
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 23rd, 2019 (12:56 PM). Edited May 23rd, 2019 by TubbieRanger.
TubbieRanger TubbieRanger is offline
UNprofessional ROMhacker
 
Join Date: Aug 2017
Posts: 5
Thanks
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:19 AM.