Pawno bug??? - 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)
+--- Thread: Pawno bug??? (
/showthread.php?tid=370375)
Pawno bug??? -
ddnbb - 19.08.2012
pawn Код:
new owner[MAX_PLAYER_NAME], extortion[35];
if(isnull(WeaponBiz[idx][wOwner])) // This part works fine.
{
owner = "None";
}
else
{
strins(owner, WeaponBiz[idx][wOwner], 0, MAX_PLAYER_NAME);
}
if(isnull(WeaponBiz[idx][wExtortion])) // This gives me the errors, wtf?
{
extortion = "None";
}
else
{
strins(extortion, WeaponBiz[idx][wExtortion], 0, 35);
}
errors:
pawn Код:
error 001: expected token: ")", but found "["
error 029: invalid expression, assumed zero
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Anyone know whats going on? This makes me crazy...
Re: Pawno bug??? -
ddnbb - 20.08.2012
Bump.
Is this mission impossible or what?
Re: Pawno bug??? -
Cjgogo - 20.08.2012
First of all why do you use strins,instead of format?
Re: Pawno bug??? -
ddnbb - 20.08.2012
Quote:
Originally Posted by Cjgogo
First of all why do you use strins,instead of format?
|
Why does it matter, thats not the point of the problem. Besides ive tried the same with the format, and it has nothing to do with the error.
Re: Pawno bug??? -
CentyPoo - 20.08.2012
pawn Код:
new owner[MAX_PLAYER_NAME], extortion[35];
if(!WeaponBiz[idx][wOwner])
{
owner = "None";
}
else
{
strins(owner, WeaponBiz[idx][wOwner], 0, MAX_PLAYER_NAME);
}
if(!WeaponBiz[idx][wExtortion])
{
extortion = "None";
}
else
{
strins(extortion, WeaponBiz[idx][wExtortion], 0, 35);
}
Try this?
Re: Pawno bug??? -
ddnbb - 20.08.2012
Quote:
Originally Posted by CentyPoo
pawn Код:
new owner[MAX_PLAYER_NAME], extortion[35]; if(!WeaponBiz[idx][wOwner]) { owner = "None"; } else { strins(owner, WeaponBiz[idx][wOwner], 0, MAX_PLAYER_NAME); } if(!WeaponBiz[idx][wExtortion]) { extortion = "None"; } else { strins(extortion, WeaponBiz[idx][wExtortion], 0, 35); }
Try this?
|
This doesnt work, it cant handle empty string.
Also strlen cant handle a empty string.
EDIT: This is solved, again by a simple mistake... I got under enum. wExtortion, isntead wExtortion[35] lol...... Makes me wanna facepalm 100x again.