Perkel
Arcane
- Joined
- Mar 28, 2014
- Messages
- 15,872
made a list and added .append with weapon. Works now. Need to test it though.
Bit different to what i had in mind but works just with additional for loop
as of :
name = weapon_create("jolly swing")
My point was more something like this:
input from keyboard string
That string then would became variable name and name for weapon at the same time.
so for example :
Type your weapon name: I type "petronas"
Then it would create variable called petronas which would be directory and in that directory there would be name with "petronas" string :
petronas = {}
then petronas = {"name" :"petronas"}
Whole point is that you can't use variable that is string for directory as it is immutable(that is what i read). So to create variable you would need to convert string to non string and state it as variable. Then that variable would work for directory name.
so if you for example state
variablea = "string"
then you can't use:
variablea["something"] = "something else"
===
Bit different to what i had in mind but works just with additional for loop
as of :
name = weapon_create("jolly swing")
My point was more something like this:
input from keyboard string
That string then would became variable name and name for weapon at the same time.
so for example :
Type your weapon name: I type "petronas"
Then it would create variable called petronas which would be directory and in that directory there would be name with "petronas" string :
petronas = {}
then petronas = {"name" :"petronas"}
Whole point is that you can't use variable that is string for directory as it is immutable(that is what i read). So to create variable you would need to convert string to non string and state it as variable. Then that variable would work for directory name.
so if you for example state
variablea = "string"
then you can't use:
variablea["something"] = "something else"
===
Last edited: