13.06.2011, 00:17
(
Последний раз редактировалось Gamer_Z; 13.06.2011 в 04:52.
)
Hey this plugin is allocating some wrong memory adresses?
I did not format any strings with 'public OnPlayerConnect' but WTF look at this:
edit after fixing the problemk code is not important, If you need it to fix the error/ whatever I will pm it to you.
Looks like it's not scripting based error. But it can be 'fixed' with scripting.
Edit:
Okay it's fixed (with a temporary solution?) , added everywhere string terminator's , a few spaces and _'s
EDIT3:
NOT SLOVED, still reappears after adding a few strings!!
It has to be somewhere here...
When I add short strings is appears, when I add very long strings, about 4 times it dissapears.
Eh the streamer affects all my format()s!
WuT.. is going on?
You have spawned OnPlayerConnect succefully.. what the hell... Should be a carname!
Can it be bacause this code is wrong: ?
Ah nevermind I will try to fix it myself lol..
I did not format any strings with 'public OnPlayerConnect' but WTF look at this:
edit after fixing the problemk code is not important, If you need it to fix the error/ whatever I will pm it to you.
Looks like it's not scripting based error. But it can be 'fixed' with scripting.
Edit:
Okay it's fixed (with a temporary solution?) , added everywhere string terminator's , a few spaces and _'s
EDIT3:
NOT SLOVED, still reappears after adding a few strings!!
pawn Код:
format(InfoBoxStr[7],64,"%s\0",InfoBoxStr[6]);
format(InfoBoxStr[6],64,"%s\0",InfoBoxStr[5]);
format(InfoBoxStr[5],64,"%s\0",InfoBoxStr[4]);
format(InfoBoxStr[4],64,"%s\0",InfoBoxStr[3]);
format(InfoBoxStr[3],64,"%s\0",InfoBoxStr[2]);
format(InfoBoxStr[2],64,"%s\0",InfoBoxStr[1]);
format(InfoBoxStr[1],64,"%s\0",InfoBoxStr[0]);
format(InfoBoxStr[0],64,"%s\0",msg);
format(infostr,255,"~w~%s~n~~w~%s~n~~w~%s~n~~w~%s~n~~w~%s~n~~w~%s~n~~w~%s \0",InfoBoxStr[0],InfoBoxStr[1],InfoBoxStr[2],InfoBoxStr[3]);
format(infostr2,255,"~w~%s~n~~w~%s~n~~w~%s~n~~w~%s~n~~w~%s~n~~w~%s~n~~w~%s \0",InfoBoxStr[4],InfoBoxStr[5],InfoBoxStr[6],InfoBoxStr[7]);
When I add short strings is appears, when I add very long strings, about 4 times it dissapears.
Eh the streamer affects all my format()s!
WuT.. is going on?
You have spawned OnPlayerConnect succefully.. what the hell... Should be a carname!
Can it be bacause this code is wrong: ?
pawn Код:
stock SendFormatInfo(const msg[],bool:check=false,{Float,_}:...)
{
new len = strlen(msg),d=0,posArg = 2;
new dest[512];
for(new i=0;i<len;i++)
{
if(msg[i] == '%')
{
switch (msg[i+1])
{
case 's':
{
new pos,arg,tmppos;
new str[128];
while(getarg(posArg,pos)!='\0')
{
arg=getarg(posArg,pos++);
str[tmppos]=arg;
tmppos++;
}
strins(dest,str,d,strlen(str));
d+=strlen(str);
posArg++;
i++;
}
case 'i', 'd':
{
new str[128];
format(str,sizeof(str),"%d",getarg(posArg));
strins(dest,str,d,strlen(str));
d+=strlen(str);
posArg++;
i++;
}
case 'f':
{
new str[128];
format(str,sizeof(str),"%f",getarg(posArg));
strins(dest,str,d,strlen(str));
d+=strlen(str);
posArg++;
i++;
}
case '.':
{
new len2 = msg[i+2];
if(len2 == 0)
{
dest[d] = msg[i];
d++;
}
else
{
new str[32],formatting[5];
formatting[0] = '%';
formatting[1] = '.';
formatting[2] = len2;
formatting[3] = 'f';
format(str,sizeof(str),formatting,getarg(posArg));
strins(dest,str,d,len2);
d+=len;
posArg++;
i+= 2;
}
}
default:
{
dest[d] = msg[i];
d++;
}
}
}
else
{
dest[d] = msg[i];
d++;
}
}
return SendInfo(dest,check);
}