mob/verb/Pause()
src.pause = !pause
for(var/obj/Slimes/Blueslime/O in world)
O.pause = !O.pause
for(var/obj/Cloud/V in world)
V.froz = !V.froz
var/list/TY = typesof(new /obj/Blink)
var/A = TY[0]
var/E = TY[1]
var/P = TY[2]
var/S = TY[3]
var/U = TY[4]
P.screen_loc = "10, 4"
A.screen_loc = "10, 5"
U.screen_loc = "10, 6"
S.screen_loc = "10, 7"
E.screen_loc = "10, 8"
src.client.screen += P
Problem description:
Am struggling hard with lists. >:|
The point of that snippet of code? To put a gathering of my objects into a small list, so I can add and remove them from my screen at will.
Along with this, the code is supposed to gather each and every individual object, add them into their own personal var, so I can edit the screen_loc at run time. I do this since I intend to reuse the object in other parts of the huds, and would need to change the screen loc constantly.
loading Slime Catchers System.dme
Z-- Debug.dm:19:error: P.screen_loc: undefined var
Z-- Debug.dm:20:error: A.screen_loc: undefined var
Z-- Debug.dm:21:error: U.screen_loc: undefined var
Z-- Debug.dm:22:error: S.screen_loc: undefined var
Z-- Debug.dm:23:error: E.screen_loc: undefined var
Z-- Debug.dm:14:warning: A: variable defined but not used
Z-- Debug.dm:15:warning: E: variable defined but not used
Z-- Debug.dm:17:warning: S: variable defined but not used
Z-- Debug.dm:18:warning: U: variable defined but not used
Slime Catchers System.dmb - 5 errors, 4 warnings
Errors:
Just so you can see what the compiler tells me.
Anywho, how I the world do I fix this? Probably an easy fix too.
var/list/TY = typesof(new /obj/Blink)
This line is definitely not accomplishing what you're trying to do. It looks like you want to populate a list with five Blink objects, but instead you're saying that TY is equal to the type-path of /obj/Blink.
(Also, you do not need new in typesof()).
Next, DM is a one-based language, which means indices begin at 1 instead of 0. var/A = TY[0] would result in an out of bounds error at runtime.
Lastly, your main issue is that you have not type-casted any of the letter variables P, A, etc. They're simply variables with no type associated with them, which is why you're receiving the undefined variable errors. You'd want to do...
var obj/Blink/A = TY[1] // and so forth.