0 Members and 1 Guest are viewing this topic.
Zeros(9)->ZGetCalc("varC")->Afloat{A}->C...stuff...GetCalc("varW",18)->AW->float{A}
In other news, Frey continues kicking unprecedented levels of ass.
Something is wrong here, because I seem to be creating the uservars improperly.Code: [Select]Zeros(9)->ZGetCalc("varC")->Afloat{A}->C...stuff...GetCalc("varW",18)->AW->float{A}This is just the relevant parts, although I am not sure if I left anything out that needs to be here.
GetCalc("varW",18)->AW->float{A}
GetCalc("varW")->AW->float{A-2}
I used to have a similar problem, until Quigibo helped me.First, you don't need to define a real var's size, it's always the same.Second, when you reference a real var, you need to subtract 2 from the pointer.
.Not sure what this line is for.Zeros(9)→Z.Don't forget error handling!!If GetCalc("varC") .You'll want code here that either jumps to a unified error handler or handles the error itself and returns/quits.End.Unless you plan on using the pointer to the OS variable C later, no need to store the GetCalc() result to a variable, you can just carry it right into the float{} command. Also added a -2 to correct for GetCalc() problems.float{-2}→C...stuff....More error handling! Also changed the size argument to account for GetCalc() issues.!If GetCalc("varW",9-2) .More error handling.End.Save the pointer to the OS variable because we can't just carry it straight into the float command this time. Also subtracted 2.-2→A.Store the Axe value W into the OS value WW→float{A}
[303132343536373839414243444546]->GDB1...muchness of stuff...GetCalc("Str1",16)->AFor(N,0,10->BFor(P,0,15For(Q,O,3If pxl-test(P*4+Q^8+87,P*4+Q/8+46+(N*9e^(3-Q)+B->BEndEnd{GDB1+B}->{A+P}EndGetCalc("Str2",16)->AEnd