Little help please
#1

Hey all, I want to have my pos saved when I login again.
pawn Код:
SetPlayerPos(playerid,X,Y,Z, dini_Int(file,"pos")-GetPlayerPos(playerid,X,Y,Z));
So.. my warning:
Код:
C:\Users\Michael\Desktop\Samp scvripting\gamemodes\roleplay.pwn(1254) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Not sure how to fix this.
Reply
#2

Is it already saving your pos on disconnect ?

Peace...
Reply
#3

you don't need - GetPlayerPos
Reply
#4

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Is it already saving your pos on disconnect ?

Peace...
I did
Quote:
Originally Posted by Steven Paul
Посмотреть сообщение
you don't need - GetPlayerPos
With this
pawn Код:
SetPlayerPos(playerid,X,Y,Z, dini_Int(file,"pos"));
Still getting the same warning :[
Reply
#5

pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,X,Y,Z);
dini_Float(file,"posx", x);
dini_Float(file,"posy", y);
dini_Float(file,"posz", z);
Reply
#6

Lol
pawn Код:
C:\Users\Michael\Desktop\Samp scvripting\gamemodes\roleplay.pwn(1423) : warning 202: number of arguments does not match definition
C:\Users\Michael\Desktop\Samp scvripting\gamemodes\roleplay.pwn(1424) : warning 202: number of arguments does not match definition
C:\Users\Michael\Desktop\Samp scvripting\gamemodes\roleplay.pwn(1425) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.
Weird... :S
Reply
#7

This is how you would go about saving it using dini:

pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
dini_FloatSet(file,"posx", x);
dini_FloatSet(file,"posy", y);
dini_FloatSet(file,"posz", z);
This is how you would go about reading and setting the position to it, using dini:

pawn Код:
SetPlayerPos(playerid, dini_Float(file,"posx"),dini_Float(file,"posy"),dini_Float(file,"posz"));
I recommend you try reading through the dini and Pawn documentation for more information as you seem to be seriously confused with your syntax here. In your original post you're setting the players position to...well something, then you're adding in an extra parameter that the SetPlayerPos function does not accept, and the parameter is the return value of GetPlayerPos subtracted from the return of the dini_Int function. I don't know what you were expecting to happen there, but it really makes no sense!
Reply
#8

Thankyou JatochNietDan
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)