Need help with function.
#1

Ok I can't figure it out, but always when I try to call this function server call it, but then just like the function don't return any value

pawn Код:
public LoadSpeedCams(){
    new String[128], Split_String[5][11], SC;
    if(!dini_Exists("speedcams.txt")){
        return 1;
    }
    SC = 0;
    new File:LoadSC = fopen("speedcams.txt", io_read);
    while(fread(LoadSC, String)){
        split(String, Split_String, ',');
        SpeedCams[SC][scX] = floatstr(Split_String[0]);
        SpeedCams[SC][scY] = floatstr(Split_String[1]);
        SpeedCams[SC][scZ] = floatstr(Split_String[2]);
        SpeedCams[SC][scMax_Speed] = strval(Split_String[3]);
        SC++;
    }
    fclose(LoadSC);
    return 1;
}
when i put it in OnGameModeInit, I call this function first, and then it won't call any other function, can any one help me
Reply
#2

smart
Reply
#3

hm look like, it don't split good, i mean it stops after 2nd split :S
Reply
#4

sorry for 3ple post, but I realized when speedcams.txt is empty it work just fine :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)