ID:140002
 
Code:
world/proc
Update_Save(k,list/S)
var/list/strg = S[3]
for(var/i = 1, i <= strg.len, ++i)
strg[i] = Escape_String(strg[i])

var/i = SendInterserverMessage("update_save", list("inv" = S[1],"bar" = S[2],"strg" = S[3],"nums" = S[4],"lst" = S[5], "key" = k))
sleep(100)
var/e = 0
while(i && e < 5)
e++
i = SendInterserverMessage("update_save", list("inv" = S[1],"bar" = S[2],"strg" = S[3],"nums" = S[4],"lst" = S[5], "key" = k))
sleep(100)
if(!i)
world.log << "Update_Save([k]) failed."


Problem description:

Everytime I try to save, I get this specific error of sorts.

runtime error: cannot read from list
proc name: Update Save (/world/proc/Update_Save)
source file: 0SpawnServer.dm,415
usr: the capacity (/mob/human/player)
src:
call stack:
: Update Save(the capacity (/mob/human/player), null)
the capacity (/mob/human/player): Save Character(the capacity (/mob/human/player))
Update_Save(xorbah) failed.

It fails, no matter what I try to do to fix it. This was the original piece to start with. Can anyone help?
Edit: var/list/strg = S[3] is the stated problem.
You are not passing a list to the procedure. Hence, this line of the runtime error:

Update Save(the capacity (/mob/human/player), null)
In response to Garthor
Okay, well, the saves are going to a MYSQL server. How would I pass the list? Is there a reference somewhere?
In response to Xorbah
No. When you are calling the proc, you are supposed to provide two arguments, with the second one being a list. You are either passing only one argument, or passing one argument and null.
In response to Garthor
So, var/i = SendInterserverMessage("update_save", list("inv" = S[1],"bar" = S[2],"strg" = S[3],"nums" = S[4],"lst" = S[5], "key" = k)) is the only arguement in this case?
In response to Xorbah
I fixed it, but now that I put the other argument in, and put libmysql.dll in my System32 folder, It comes up with this...odd error, and shuts off the server 5 seconds afterwards.
Database Connection error: The operation completed successfully.

Any help, anyone?
In response to Xorbah
Nevermind, fixed it, but it's saying that it cannot read from the list, AGAIN.
In response to Xorbah
I'd really appreciate the help, guys...It says it cannot read from the list. And I cannot understand what Garthor is saying, really.
In response to Xorbah
You are calling UpdateSave(some_players_key) or UpdateSave(some_players_key, null). Neither of these are valid, because it needs TWO arguments. The second argument should be a list.

The error is where you are CALLING the proc, not in the proc itself (unless there's an error in the proc itself, of course).