String too long ?
#1

Got the following command :
Код:
format(formal[playerid],128,"%s-racelosses",hdwid[playerid]);
INI_WriteInt(formal[playerid],1);
(SII Include)

I know, that hdwid is very long.
But in the ini-file i get :
Quote:

118018638742575-racelos=0

for example.

Any ideas, how i get this bug removed ?
I think this causes some bugs with reading & writing later on...
Reply
#2

pawn Код:
hdwid[playerid];
is that a string? if not then use
pawn Код:
%d //instead of
%s
Reply
#3

I assume it's a number (integer) you want to output. Use %d.
Reply
#4

I already had a discussion with DracoBlue, as i had some issues with this value as integer before.

Quote:
Originally Posted by DracoBlue
Hello Trooper,

your numbers are too big .

Pawn only knows integers from -2.1Mrd to +2.1Mrd.
He was right, after i used hdwid as a string, everything worked fine.

So, no, this aint the problem
Reply
#5

hdwid[playerid] is an array however you do not use it as an character array, but an array to store integer values connected to a playerid in.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)