Sccanf parameters... ssiifffs...
#1

Код:
enum pEnumInfo
{
	pName[24],
	pPass[24],
	pMoney,
	pSkin,
	Float:pX,
	Float:pY,
	Float:pZ,
	lastConnection[100]
}
Код:
sscanf(savingstring,"p<|>e<-s[24]-s[24]iifff-s[100]>", PlayerInfo[playerid]);
name-string
pass-string
pmoney int
pskin int
px-float
py-float
pz-float
lastconnection-string


px,py,pz is loaded correctly.. but i cant grab pmoney or pskin...
Reply
#2

Why are you adding dashes in the parameters line...?

Try this:

pawn Код:
sscanf(savingstring,"p<|>e<s[24]s[24]iifffs[100]>", PlayerInfo[playerid]);
Reply
#3

the db looks like this:

name-string
pass-string
pmoney int
pskin int
px-float
py-float
pz-float
lastconnection-string

and my enums are like this now

enum pEnumInfo
{
pMoney,
pSkin,
FloatX,
FloatY,
FloatZ,
}
Код:
sscanf(savingstring,"p<|>e<-s[24]-s[24]iifff-s[100]>", PlayerInfo[playerid]);
i put dashes cause i wanted to skip reading the strings and heard i can use "-". I still cant read the pmoney and pskin tho D:
Reply
#4

If you want to skip a parameter you need to use braces {} around that parameter. Better still is only selecting the stuff you need.
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)