Is there any safer way to do this?
#1

Hello, hope you're having a great day,
so is there a better way to do this,
PHP Code:
foreach(new EVM){
    
format(ghsizeof(gh), "iterator: %d"i);
    
SendClientMessage(playeridEVMCOLOR_REDgh);
    
Iter_Remove(EVMi);

ofc, it doesn't not work,
Debugging
Code:
Code 1:
foreach(new I : EVM)
     print(i);

Result:
Iterator: 0
Iterator: 1
Iterator: 2
Iterator: 3
Iterator: 4
Iterator: 5


Code 2:
foreach(new I : EVM){
     print(i);
     Iter_Remove(i);
}

Result:

sometimes it shows random numbers
Iterator: 26(The first iterator appears here)
Iterator: 0(always shows 0)
Iterator -33161(always shows this number)


some other times the server just crashes
Reply


Messages In This Thread
Is there any safer way to do this? - by Eoussama - 14.07.2017, 17:17
Re: Is there any safer way to do this? - by Logic_ - 14.07.2017, 17:30
Re: Is there any safer way to do this? - by Konstantinos - 14.07.2017, 17:33
Re: Is there any safer way to do this? - by Eoussama - 14.07.2017, 17:37
Re: Is there any safer way to do this? - by Paulice - 14.07.2017, 17:45
Re: Is there any safer way to do this? - by Eoussama - 14.07.2017, 17:48
Re: Is there any safer way to do this? - by Paulice - 14.07.2017, 18:09
Re: Is there any safer way to do this? - by Eoussama - 14.07.2017, 18:15

Forum Jump:


Users browsing this thread: 2 Guest(s)