sscanf warning: No default value found.
#1

Код:
if(sscanf(params,"Sds",player,timer,priezastis))
Reply
#2

S needs to have () after it. Inside the ()-markers you place a default value. If none, then nothing placed inside it.

Код:
if(sscanf(params,"S()ds",player,timer,priezastis))
Any specifier captalized means that they are optional and/or has a default value. Not sure if it's the smartest to have the first value as optional but your choice!
Reply
#3

Now
sscanf warning: Strings without a length are deprecated, please add a destination size.
Reply
#4

Probably because you decided to use two strings without defining how long they will be in one param-string.
https://sampforum.blast.hk/showthread.php?tid=570927

Right now your first string reads the whole params-string as you didn't set any length on it, meaning "d" (timer) and "s" (priezastis) will not really be read. Just guessing though, I might be wrong (especially about the S() reading the "d" part).
Reply
#5

if(sscanf(params,"s[128]ds[128]",player,timer,priezastis))
Reply
#6

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
if(sscanf(params,"s[128]ds[128]",player,timer,priezastis))
Works fine. Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)