Few Warnings When Comiling
#5

Without looking for errors in the syntax..

I think you should split the line up into at least two stages.

I Think the script will try to evaluate both parts of the if statement at the same time, therefore if the first value is not true, it will still try to evaluate the second, causing problems when it tried to read from the array ( position -100 )

Furthermore ( I'm not sure about this ) I think strcmp might return true if the array you are comparing it to is empty, so you might want to throw a line in there to check for that.

pawn Код:
if(PlayerInfo[playerid][pPbiskey] >= 100 )
{
     new owner[24];
     strmid(owner,SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner],0,24,24);
     if(strlen(owner))
     {
          if(!strcmp(sendername,owner,true))
         {
// rest of stuff here
This is just based on my experience of things that do and don't work in pawn, and is not nescessarilly the best way to do it.
Reply


Messages In This Thread
Few Warnings When Comiling - by lewismichaelbbc - 05.12.2010, 14:40
Re: Few Warnings When Comiling - by JaTochNietDan - 05.12.2010, 14:44
Re: Few Warnings When Comiling - by lewismichaelbbc - 05.12.2010, 14:51
Re: Few Warnings When Comiling - by [MWR]Blood - 05.12.2010, 14:52
Re: Few Warnings When Comiling - by Rachael - 05.12.2010, 14:53

Forum Jump:


Users browsing this thread: 2 Guest(s)