GetPVarString And Strcmp problems
#2

The gametext should be displayed if the names are different. Try this code to see where everything really fails

pawn Код:
else if(LocationStatus[i] == 2)
{
  GetPVarString(i,"lastlocation",lastloc,sizeof(lastloc));
    printf("1, lastloc= %s", lastloc);
  if(!strlen(lastloc))
  {
        printf("2");
    format(lastloc, sizeof(lastloc), "%s", zone);
        printf("3, lastloc= %s, zone= %s", lastloc, zone);
    SendAllMsg(RED, "lastloc did not contain anything - set to: '%s'", lastloc);
        printf("4");
  }
    printf("5");
  SendAllMsg(RED, "Getting string into lastloc from lastlocation - output: '%s'", lastloc);
    printf("6");
  format(oldloc, sizeof(oldloc), "%s", lastloc);
    printf("7, lastloc= %s, oldloc= %s", lastloc, oldloc);
  if(strcmp(oldloc, zone, true))
  {
        printf("8, zone= %s", zone);
    GameTextForPlayer(i, zone, 1000, 1);
        printf("9");
        SendAllMsg(RED, "location names are different - oldloc: '%s' new loc: '%s'", lastloc, zone);
        printf("10");
    }
    printf("11");
}
Reply


Messages In This Thread
GetPVarString And Strcmp problems - by bpeterson - 07.05.2010, 20:27
Re: GetPVarString And Strcmp problems - by dice7 - 07.05.2010, 20:38
Re: GetPVarString And Strcmp problems - by bpeterson - 08.05.2010, 13:22
Re: GetPVarString And Strcmp problems - by Jefff - 08.05.2010, 13:25
Re: GetPVarString And Strcmp problems - by bpeterson - 08.05.2010, 13:31
Re: GetPVarString And Strcmp problems - by bpeterson - 08.05.2010, 14:27
Re: GetPVarString And Strcmp problems - by dice7 - 09.05.2010, 11:04
Re: GetPVarString And Strcmp problems - by Jefff - 09.05.2010, 12:13
Re: GetPVarString And Strcmp problems - by bpeterson - 10.05.2010, 11:44

Forum Jump:


Users browsing this thread: 1 Guest(s)