Moderator: MacroQuest Developers

Code: Select all
/sub main
/echo @param0
/returnCode: Select all
/sub main(param0)
/echo @param0
/returnCode: Select all
/sub main
/call sub2 @param0
/return
/sub sub2(param0)
/echo @param0
/return
Yes, variables are case sensitive, and unnamed parameters are Param, not paramdont_know_at_all wrote:prints @param0Code: Select all
/sub main /echo @param0 /return
Is this correct?
Ok, that's semi-bad... logically its: "@param0" doesn't resolve so it leaves it as "@param0" and passes it indont_know_at_all wrote:Hangs like a mo' fo'. One of the search argument routines is broken.Code: Select all
/sub main /call sub2 @param0 /return /sub sub2(param0) /echo @param0 /return


But it's always been a string lookup more or less. I think there is something really inefficient going on.Plazmic wrote:All variable lookups are string based. It'd be even slower if vars weren't case sensitive.

Code: Select all
/declare BuffTimer0 timer
/declare BuffTimer1 timer
/declare BuffTimer2 timer
/declare BuffTimer3 timer
/declare BuffTimer4 timer
/declare BuffTimer5 timer
/declare BuffIndex local
/for BuffIndex 0 to 5
/if n @BuffTimer@BuffIndex==0 /call rebuff @BuffIndex
/next BuffIndex
No, before we parsed 1 char, and did an atoi, and referenced an indexed array...dont_know_at_all wrote:But it's always been a string lookup more or less. I think there is something really inefficient going on.
That does sound slow, but if you are in #turbo mode, it would be 4 frames per second, unless your code is overloaded with /doevents, which could be part of the slowdown (inefficient code?)dont_know_at_all wrote:I'm only getting like four course adjustments per cast time, which means it takes nearly a second to do some simple math and a doevents on a PII 450. I'm going to add some more spew and see if I can figure it out.


