Mirage Engine
Saving players - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Saving players (/showthread.php?tid=491)



- Rian - 18-12-2006

Seems like playerI doesn't have any reference

Code:
Dim I As Long

For I = 0 To MAX_PLAYERS
    Call SavePlayer(I)
Next I

I think that's all you'd really need to save all the players.
Does it just not work, or do you get an error of some sort?


- Rian - 18-12-2006

Do you get the RTE 9 using your code, or the code I gave you to use?


- William - 18-12-2006

Im pretty sure the Index is above 0. So try this:

Code:
Dim I As Long

For I = 1 To MAX_PLAYERS
    Call SavePlayer(I)
Next I



- Dragoons Master - 18-12-2006

You need to check if that player(index) is online or not xD

Code:
Dim I As Long

For I = 0 To MAX_PLAYERS
    If IsPlaying(I) Then
        Call SavePlayer(I)
    End If
Next I
That should work Smile

EDIT: sry, I didn't read all your last post Jobs...