CraftTweaker

CraftTweaker

151M Downloads

Loop won't work

drakray opened this issue ยท 14 comments

commented

I got this code

which doesn't output error in chat, but in minetweaker.log

I tried with import minetweaker.item.IItemStack; as stated on the wiki, bt I got a chat error with that

commented

I'm not sure on loops, but are you sure it is meant to be for i, thedprmlog? Do me a favor and remove "thedprmlog" from the loop.

On Sep 3, 2016 7:39 PM, "Raymond Tremblay" [email protected] wrote:

I got this code http://pastebin.com/2fg2qTyN

which doesn't output error in chat, but in minetweaker.log
http://pastebin.com/zCsmw15x

I tried with import minetweaker.item.IItemStack; as stated on the wiki, bt
I got a chat error with that

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jaredlll08/CraftTweaker/issues/51, or mute the thread
https://github.com/notifications/unsubscribe-auth/AFS9xfBwxZbhrYHZz9MsJp0dpQ8EHeiVks5qmbDtgaJpZM4J0WnA
.

commented

can try, but I copy/paste from the wiki and adapted my variable to be clear so.
I'll try

EDIT: got the same error
ERROR: Error executing modDRPMedieval.zs: Bad type on operand stack

commented

ok, yea, I found the wiki thing, ok so try make the arrays var instead of val please

commented

Tried that at first, retried live, same error

commented

ok, yea, weird, could you try the loop with just these lines?

 var theMCLog = listMCLog[i];
  var theMCPlank = listMCPlank[i];
  var theDRPMPlank = listDRPMPlank[i];
print(theMCLog.displayName);
print(theMCPlank .displayName);
print(theDRPMPlank .displayName);

I have a feeling that one of those is null, so this should tell us which one

commented

ERROR: modDRPMedieval.zs22 > any value not yet supported
ERROR: modDRPMedieval.zs23 > any value not yet supported
ERROR: modDRPMedieval.zs24 > any value not yet supported
ERROR: Error executing modDRPMedieval.zs: minetweaker/api/item/IItemStackAny

commented

uh, is this with

import minetweaker.item.IItemStack;

?

commented

ERROR: Error parsing modDRPMedieval.zs:3 -- Invalid expression, last token: import

commented

full .log relevant code
http://pastebin.com/5SNf4SJR

commented

uh, post your whole script please

commented

put that import at the beginning of the file please

commented

seems to work as intended, at last! :D
should have a disclaimer somewhere to say that IMPORT must ALWAYS be at absolute begining of file, even before PRINTs

Thank you!

commented

Final file, al working well, fully optimized
http://pastebin.com/raw/UTBmuw8i