Looping through an enum
#3

Well, enums are tricky bests. Read up https://sampforum.blast.hk/showthread.php?tid=318307

If you have
pawn Код:
enum _e_faction_rank {
  a[32],
  b[32]
}
Then _:a == 0 and _:b == 32

As for particular reason for what you see: string is just an array ended with NUL/0/'\0'/EOS (all the same value of 0), and all string functions know when string ends when they see it. See
pawn Код:
new boop[] = "Hello world";
print(boop); //Hello world
print(boop[3]); //lo world
Reply


Messages In This Thread
Looping through an enum - by zsoolt997 - 15.01.2018, 17:57
Re: Looping through an enum - by chneubeul - 15.01.2018, 18:06
Re: Looping through an enum - by Misiur - 15.01.2018, 18:10
Re: Looping through an enum - by zsoolt997 - 16.01.2018, 06:34
Re: Looping through an enum - by MP2 - 17.01.2018, 07:42

Forum Jump:


Users browsing this thread: 1 Guest(s)