Jump to content




NEI Required? and Return Table (Function) Error


  • You cannot reply to this topic
9 replies to this topic

#1 davidgumazon

  • Members
  • 30 posts
  • LocationPhilippines

Posted 23 June 2015 - 01:05 PM

Hey Guys! i'm Confuse about this Things (cuz i'm not familiar this acronym)

is NEI is Really Required? to fix other recipe's mods? for ComputerCraft
i'm Confuse cuz Alot of People use this Acronym :// and i dont understand

please anyone answer my simple question...

and

if i do this Function it gives nil, im confuse i need this function
function returnTable(...) ... end --Load Function for..
example={"blabal","lololol","just example ;)/>"}
local param1,param2,param3=returnTable(example)
--example hav 3 table or more param for returnTable(...)
this my returnTable Code
function returnTable(_)
retset="return "
for i=1,#_ do
  retset=retset.._[i]..','
end
ls=loadstring(retset)
ls()
end


#2 wieselkatze

  • Members
  • 221 posts
  • LocationGermany

Posted 23 June 2015 - 06:05 PM

So you basically want you table split up in separate values? The following code would do aswell:

local yourTable = {
	"value 1";
	"value 2";
	"value 3";
}

local val_1, val_2, val_3 = unpack( yourTable )

unpack() is a builtin lua function, you can find some information here - bottom half of the page.

I don't really know what you mean with 'Is NEI required to fix others' mods recipes' - NEI is just there to display all the registered recipes. Also it lets you do some tweaks, e.g. changing weather, time etc..

Edited by wieselkatze, 23 June 2015 - 06:06 PM.


#3 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 23 June 2015 - 11:51 PM

View Postdavidgumazon, on 23 June 2015 - 01:05 PM, said:

Hey Guys! i'm Confuse about this Things (cuz i'm not familiar this acronym)

is NEI is Really Required?

What made you think it was required?

You shouldn't need it, but it is by far the best mod for recipes, since it can automatically determine vanilla recipes, and plugins allow it to display modded machine recipes

It stands for Not Enough Items, which is a word play on the mod Too Many Items, which had the ability to only cheat in items (Don't think it can show recipes)

#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 23 June 2015 - 11:55 PM

wieselkatze is right, you should be using the unpack() function.

But as to why your function doesn't work, the "retset" string it constructs would end up looking like this:

return blabal,lololol,just example ;)/>,

Whereas you would want it to look like this:

return "blabal","lololol","just example ;)/>"

The last line, "ls()", should also've been written as "return ls()".

#5 davidgumazon

  • Members
  • 30 posts
  • LocationPhilippines

Posted 24 June 2015 - 10:45 AM

View Postwieselkatze, on 23 June 2015 - 06:05 PM, said:

So you basically want you table split up in separate values? The following code would do aswell:

local yourTable = {
	"value 1";
	"value 2";
	"value 3";
}

local val_1, val_2, val_3 = unpack( yourTable )

unpack() is a builtin lua function, you can find some information here - bottom half of the page.

I don't really know what you mean with 'Is NEI required to fix others' mods recipes' - NEI is just there to display all the registered recipes. Also it lets you do some tweaks, e.g. changing weather, time etc..
local val_1, val_2, val_3 = unpack( yourTable )
ur Code Returns Limited but i need Returns Infinitely it Returns How much Table is there
example : #var1 is 4, #var2 is 18 then i do
param1,param2,param3,param4=returnTable(var1)
param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,param_9,param_10,param_11,param_12,param_13,param_14,param_15,param_16,param_17,param_18=returnTable(var2)
so the API i talk about is how much Table Stored in Variable it returns How Much Stored Tables there, ill try ur code later (cuz ill update my minecraft forge & mods)

View PostHPWebcamAble, on 23 June 2015 - 11:51 PM, said:

View Postdavidgumazon, on 23 June 2015 - 01:05 PM, said:

Hey Guys! i'm Confuse about this Things (cuz i'm not familiar this acronym)

is NEI is Really Required?

What made you think it was required?

You shouldn't need it, but it is by far the best mod for recipes, since it can automatically determine vanilla recipes, and plugins allow it to display modded machine recipes

It stands for Not Enough Items, which is a word play on the mod Too Many Items, which had the ability to only cheat in items (Don't think it can show recipes)
cuz after hear NEI on my bug Report in http://www.computerc...799#entry210799 you can see Comments Scenes are ..., @Dan200 says "...NEI recipe bug... fixed..." that's why made me think it was required -__-
and Thanks for the Acronym , i feel refresh about "NEI"
(o_o) wait NEI is 3, Not Enough Items is 3 Sentence, it means 6, NEI's acronym "Enough" col is 6, so it says ENOUGH, and NEI word was Weird and i heard this word from song *..Watch me NEI NEI..* 2 NEI in that song my costomers in my Cafe dont stop playing that song so i want to tell them "Enough", it means 0_0 i was Fool, ... , #illumiPizza_Confirmed

View PostBomb Bloke, on 23 June 2015 - 11:55 PM, said:

wieselkatze is right, you should be using the unpack() function.

But as to why your function doesn't work, the "retset" string it constructs would end up looking like this:

return blabal,lololol,just example ;)/>/>,

Whereas you would want it to look like this:

return "blabal","lololol","just example ;)/>/>"

The last line, "ls()", should also've been written as "return ls()".
Thanks ;D ill Fix my Code Later (cuz ill update my Minecraft Forge & Mods)

#6 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 24 June 2015 - 02:22 PM

unpack is not limited. It returns the number of items in a table; if that's 200, you get 200 results.

#7 davidgumazon

  • Members
  • 30 posts
  • LocationPhilippines

Posted 24 June 2015 - 03:14 PM

View PostKingofGamesYami, on 24 June 2015 - 02:22 PM, said:

unpack is not limited. It returns the number of items in a table; if that's 200, you get 200 results.
i know ._. , i talking about ---> local val_1,val_2,val_3 <--- #Limited
hmm unpack might be useful for my API Project

3 Parameters, triangle has 3 sides, 3+3=6, 6/2=3, pizza has 3 sides and 3 hunger regen
*it can be i was fool again* #illumipizza_confirmed

#8 wieselkatze

  • Members
  • 221 posts
  • LocationGermany

Posted 24 June 2015 - 04:14 PM

I don't know if you got it, but the names I used are just sample names for variables. It could aswell just be the following:

local a, b, c, d, e, f, g, h = unpack( yourTable )

or

local f1, g2, h3, i4, j5, k6, l7 = unpack( yourTable )

As the name says - they are variable. Just the same as your 'param1,param2,param3' etc.

Edited by wieselkatze, 24 June 2015 - 04:15 PM.


#9 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 25 June 2015 - 01:03 AM

View Postdavidgumazon, on 24 June 2015 - 10:45 AM, said:

cuz after hear NEI on my bug Report in http://www.computerc...799#entry210799 you can see Comments Scenes are ..., @Dan200 says "...NEI recipe bug... fixed..." that's why made me think it was required -__-

Apparently mods have to tell NEI what their recipes are, so NEI can show those recipes to players. Dan had made a mistake causing the Advanced Computer recipe to display an incorrect component. It only affected people who actually had NEI installed.

#10 davidgumazon

  • Members
  • 30 posts
  • LocationPhilippines

Posted 27 June 2015 - 07:20 AM

View Postwieselkatze, on 24 June 2015 - 04:14 PM, said:

I don't know if you got it, but the names I used are just sample names for variables. It could aswell just be the following:

local a, b, c, d, e, f, g, h = unpack( yourTable )

or

local f1, g2, h3, i4, j5, k6, l7 = unpack( yourTable )

As the name says - they are variable. Just the same as your 'param1,param2,param3' etc.
k, for me i use loadstring for infinitely results and i get ERROR cuz i didn't add local variable

View PostBomb Bloke, on 25 June 2015 - 01:03 AM, said:

View Postdavidgumazon, on 24 June 2015 - 10:45 AM, said:

cuz after hear NEI on my bug Report in http://www.computerc...799#entry210799 you can see Comments Scenes are ..., @Dan200 says "...NEI recipe bug... fixed..." that's why made me think it was required -__-

Apparently mods have to tell NEI what their recipes are, so NEI can show those recipes to players. Dan had made a mistake causing the Advanced Computer recipe to display an incorrect component. It only affected people who actually had NEI installed.
i use CraftGuide Mod but before i report Recipe Bug in this forum, craftguide mod tells me advance computer's recipe normally when i tried to craft advance computer nothing happens then i double check craftguide it doesn't work again -_- so i report the bug, i hope @Dan200 fix that recipe bug

#imbadgrammur





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users