Android kawaiimaidmod lua bug... please help me

Android version 8219

I believe the problem with CTDing is here

" player:i_rem(item) "

As one can guess it is the part of the code to remove a item from the player’s inv…

like when you open the fancy box.
like when you use the install implant kit.
like when you send out items for points.

… But it just plain is not working and i can’t figure out why for the life of me.

Please someone with a clue of what they are doing help me.

" player:i_rem(item(“kawaii_amts_box”, 1)) "
does not work either… just gives me a error that there is no item to remove

Okay a temp and bad fix for this is to just remove all the " player:i_rem(item) " lines

And it works fine just the items don’t get removed like they should…
Just going to drop them on the ground for now till someone can fix this…
I have 100% run out of ideas other then this being a bug with CDDA and the " player:i_rem(item) "
no longer works.

1 Like

If you want to remove item from player inventory you should either provide item (item reference) or int (item position in player inventory).

You can interate through all items in player inventory and use player:i_at(int) to get item.

All hail Zhilkin! I will try to set that up as soon as my tablets battery is not nearly 0%… bit to much coding and playing cdda… :3

Okay i know this is a problem of my own lack of ability but at this point i am just going to take a break from trying to get this to work and leave this here

at least like this it no longer CTDs but the items still don’t get removed.

– ■AMTS Installation kit (Read the notes on the outer box) (“kawaii_amts_box”)
function amts_kit(item, active)
game.popup(gText(“boxmemo”))
cmsg(“light_green”, “You open the fancy box.”)
player:i_add(item(“kawaii_amts_box2”, 1))
player:i_add(item(“kawaii_amts_manual”, 1))
player:i_at(int)
player:i_rem(item)
end

– ■AMTS Installation kit (treatment) (“kawaii_amts_box2”)
function amts_kit2(item, active)
cmsg(“light_green”, “You implant the AMTS device.”)
player:set_value(“Kawaii_AMTS_Active”, “true”)
player:i_add(item(“kawaii_amts_reciver”, 1))
player:i_add(item(“kawaii_amts_transmitter”, 1))
player:i_add(item(“kawaii_amts_point_viewer”, 1))
EditRP(0)
EditPoint(0)
player:i_at(int)
player:i_rem(item)
end

And even if i get that working i have no idea about the removeing of 1 item out of a list of them for another part of the code… kawaiimaidmod preload.lua

If anyone wants to tell my bakaself what i am doing wrong please tell me.

Been playing for awhile now and…

turns out even more of the lua is borked…

You can’t gain points for rank ups…

… i really like this mod but my goddess it’s lua loves breaking.

…guess i’ll try to fix it after i or someone else somehow or another fixes the item removels.

1 Like