Positions
#1

OnDialogResponse
pawn Код:
if(dialogid == 2021)
        {
            if(response)
            {
                new UserPath[MAX_STRING];
                new Float:X,Float:Y,Float:Z;
                format(UserPath,sizeof(UserPath),"Positions/%s.ini",GetName(playerid));
                if(dini_Exists(UserPath))
                {
                    X = dini_Get(UserPath,"PositionX");
                    Y = dini_Get(UserPath,"PositionY");
                    Z = dini_Get(UserPath,"PositionZ");
                }
                SetPlayerPos(playerid,X,Y,Z);
            }
            else
            {
                SetPlayerSpawn(playerid);
            }
            return 1;
        }
Errors & Warnings:
Код:
error 006: must be assigned to an array
error 006: must be assigned to an array
error 006: must be assigned to an array
In this lines:
pawn Код:
X = dini_Get(UserPath,"PositionX");
Y = dini_Get(UserPath,"PositionY");
Z = dini_Get(UserPath,"PositionZ");
Reply
#2

just make them an array?

like

pawn Код:
new x[128], y[128], z[128];
instead of the floats
Reply
#3

It should be
pawn Код:
new Float:x[MAX_PLAYERS];, Float:y[MAX_PLAYERS], Float:z[MAX_PLAYERS];
And change all the x to x[playerid] = ...;
Reply
#4

Код:
error 035: argument type mismatch (argument 2)
For this:
pawn Код:
SetPlayerPos(playerid,X,Y,Z);
Reply
#5

It should be
pawn Код:
SetPlayerPos(playerid,X[playerid],Y[playerid,Z[playerid]);
Reply
#6

pawn Код:
SetPlayerPos(playerid,X[playerid],Y[playerid],Z[playerid]);
EDIT:too late
Reply
#7

I did as emokidx111 said...

Код:
error 035: argument type mismatch (argument 2)
pawn Код:
SetPlayerPos(playerid,X,Y,Z);
Reply
#8

Do as Wesley221 said.
Reply
#9

LMAO.
These are floats.
pawn Код:
X = dini_Float(UserPath,"PositionX");
Y = dini_Float(UserPath,"PositionY");
Z = dini_Float(UserPath,"PositionZ");
Or how ever it is.
Get is for strings.
Reply
#10

Why can no-one ever identify the REAL source of the problem;
pawn Код:
dini_Get
Is for strings, and strings only! Use dini_Float!
Edit: Beat me to it, lol.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)