My Server Problem
#1

https://imgur.com/a/YFzmEHC

Please Help me.

Code:
SSCANF Warning: Format specifier does not match parameter Count.
Code:
ERROR: Could not connect to YSI
Update server (response was 301).
"I'm using sscanf2"
Reply
#2

Honestly do you think a bunch of errors will magically help us fix your code?
Did you ever try to fix errors without anything shown? Maybe you have some powers which allows you to guess other people's code, but I don't think this is the case with most people here.
https://sampforum.blast.hk/showthread.php?tid=574725
Reply
#3

I'm sorry sir, my glass ball which I use to magically look into people's code has broken the other day.
Reply
#4

Quote:
Originally Posted by Adamoneoone
View Post
Honestly do you think a bunch of errors will magically help us fix your code?
Did you ever try to fix errors without anything shown? Maybe you have some powers which allows you to guess other people's code, but I don't think this is the case with most people here.
https://sampforum.blast.hk/showthread.php?tid=574725
Sorted <3
Reply
#5

Error says it all, at some places where you have used sscanf like sscanf(... , ... , ...);
The parameter count doesnt match with specifier.

For example,
pawn Code:
sscanf(str, "ii", val);
//or
sscanf(str, "i", val, val_2);
You can clearly see what's wrong no. of specifiers inside quotes does not match with the parameter count(val ... )

Look for smth like that in your code
Reply
#6

seems , I'm using

[/code]#include <sscanf>[/code]
I will replace all sscanf to sscanf2 ?
Reply
#7

is this correct?

Code:
LoadThePay()
{

	new sz_FacPayStr[128], File: i_FileHandle, arrayIndex;

	#define PAY_FILE "factionpay.cfg"

	if(!fexist(PAY_FILE)) return 1; // Why create a file when you're trying to load?

	i_FileHandle = fopen(PAY_FILE, io_read);
	while (arrayIndex < sizeof(FactionPay))
	{
		fread(i_FileHandle, sz_FacPayStr);
		sscanf(sz_FacPayStr, "p<|>iiiiiii",
			FactionPay[arrayIndex][0],
			FactionPay[arrayIndex][1],
			FactionPay[arrayIndex][2],
			FactionPay[arrayIndex][3],
			FactionPay[arrayIndex][4],
			FactionPay[arrayIndex][5],
			FactionPay[arrayIndex][6]);
		arrayIndex++;
	}
	return fclose(i_FileHandle);
}
Reply
#8

It should be, yes. But the thing is, you forgot to set 'arrayIndex' to 0.
Also, the sscanf part seems to be okay.
Reply
#9

Quote:
Originally Posted by XStormiest
View Post
It should be, yes. But the thing is, you forgot to set 'arrayIndex' to 0.
Also, the sscanf part seems to be okay.
Like This ?

Code:
{
		fread(i_FileHandle, sz_FacPayStr);
		sscanf(sz_FacPayStr, "p<|>iiiiiii",
			FactionPay[arrayIndex][0],
			FactionPay[arrayIndex][1],
			FactionPay[arrayIndex][2],
			FactionPay[arrayIndex][3],
			FactionPay[arrayIndex][4],
			FactionPay[arrayIndex][5],
			FactionPay[arrayIndex][6]);
		arrayIndex, 0;
	}
?
Reply
#10

Quote:
Originally Posted by XStormiest
View Post
It should be, yes. But the thing is, you forgot to set 'arrayIndex' to 0.
Also, the sscanf part seems to be okay.
Can you give me Example ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)