Pawno bug???
#1

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...
Reply
#2

Bump.

Is this mission impossible or what?
Reply
#3

First of all why do you use strins,instead of format?
Reply
#4

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.
Reply
#5

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?
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)