Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 03-29-2012, 03:31 PM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by ffcmike View Post
No, it's because you're attempting to use the same 'i' variable within loops contained within loops, which basically resets the first loop back to 0 and repeats infinitely until the engine cancels it.

The rest of the code is also terribly inefficient, can be accomplished by much easier means, and it doesn't really make sense that you're defining this. variables as if they're a temp. variable while using a prefix in the name. Those arrays should be set one time onCreated.
Ahh, didn't see the same 'i' being used, I'll have to add temp later.
My much easier means that I thought of was doing the .index() but I didn't know how. ^.^; didn't feel like bothering you so I did it with a for loop.

Also, they are temp since most of the staff will be deleted after the LAT contest. o.O; I put temp for my own purposes.


I believe this was all I had to do. ^.^;;
I don't know why I used 'i' twice. Late at night I do stupid things.
Added temp. as well, not sure why I left that out either.
PHP Code:
      else if (player.account in this.tempStaff){
        for (
temp.a=0this.tempStaff.size(); a++){
          if  (
player.account == this.tempStaff[a] && player.level == this.tempStaff[a+1]){
            for (
temp.i=0params[1].size(); i++){ 
Thank you all, lets see if it works on the fourth. o.O;;
I guess my problem was stupidity and drowsiness.

-EDIT-

However, my friend is trying to create a baddy using a specific algorithm and he is having problems with maxing out the loop only if he doesn't add a sleep .05 in..

I believe he wants something like an onTimeout calling an onTimeout right after the end of checking... Perhaps that is the same problem? I don't know. I doubt he will post on the forums though..
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz




Last edited by Devil_Lord2; 03-29-2012 at 04:07 PM..
Reply With Quote
 


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 +2. The time now is 02:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.