SA-MP Forums Archive
String too long ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: String too long ? (/showthread.php?tid=148249)



String too long ? - Trooper[Y] - 16.05.2010

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...


Re: String too long ? - MPKaboose - 16.05.2010

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



Re: String too long ? - westre - 16.05.2010

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


Re: String too long ? - Trooper[Y] - 16.05.2010

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


Re: String too long ? - juice.j - 16.05.2010

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.