stock LoadNewMap()
{
new file[64];
mapid %= MAX_MAP_FILES;
format(file, sizeof(file), "/Maps/%d.ini", mapid);
if(!fexist(file)) return printf("[NOTICE] File Bugged.");
LastMapStarted = mapid;
mapid++;
return mapid-1;
}
|
hello samp,,,
anyone can help me for fixing this,, i have 10 maps for my gm,,when i start my server,,they work.good,, but after 10 maps when server again load map 1.. and map.1 time complete.,,server not loading other maps,,server loading map 1 again and again,,and my gm crash.. PHP код:
|
stock LoadNewMap()
{
new file[64];
LastMapStarted = mapid;
mapid = mapid==MAX_MAP_FILES?(1):(mapid+1);
format(file, sizeof(file), "/Maps/%d.ini", mapid);
if(!fexist(file)) return printf("[NOTICE] File Bugged.");
return mapid;
}
main()
{
LoadNewMap();
}
#define MAX_MAP_FILES (5)
new mapid,
LastMapStarted;
stock LoadNewMap()
{
new file[64];
LastMapStarted = mapid;
mapid = mapid==MAX_MAP_FILES?(1):(mapid+1);
format(file, sizeof(file), "/Maps/%d.ini", mapid);
if(!fexist(file)) return printf("[NOTICE] File Bugged.");
return mapid;
}
|
main() { LoadNewMap(); } #define MAX_MAP_FILES (10) new mapid, new LastMapStarted = -1; stock LoadNewMap() { new file[64]; LastMapStarted = mapid; mapid = mapid==MAX_MAP_FILES(10) mapid+1); ////this lineformat(file, sizeof(file), "/Maps/%d.ini", mapid); if(!fexist(file)) return printf("[NOTICE] File Bugged."); return mapid; } |
: error 029: invalid expression, assumed zero
: warning 215: expression has no effect
: error 001: expected token: ";", but found ":"
: error 029: invalid expression, assumed zero
: fatal error 107: too many error messages on one line
|
stock LoadNewMap() { new file[64]; LastMapStarted = mapid; mapid = mapid==MAX_MAP_FILES(10),(mapid+1); ///problem in this line format(file, sizeof(file), "/Maps/%d.ini", mapid); if(!fexist(file)) return printf("[NOTICE] File Bugged."); return mapid; } |
: error 029: invalid expression, assumed zero
: warning 215: expression has no effect
: warning 215: expression has no effect|
and when i use like this then 1 error..
C:\Users\muaz baba\Desktop\zGM[Fahad]\gamemodes\zma.pwn(521 : error 029: invalid expression, assumed zeroC:\Users\muaz baba\Desktop\zGM[Fahad]\gamemodes\zma.pwn(521 : warning 215: expression has no effectC:\Users\muaz baba\Desktop\zGM[Fahad]\gamemodes\zma.pwn(521 : warning 215: expression has no effectPawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase |
stock LoadNewMap()
{
new file[64];
LastMapStarted = mapid;
mapid = mapid == MAX_MAP_FILES ? (1) : (mapid+1);
format(file, sizeof(file), "/Maps/%d.ini", mapid);
if(!fexist(file)) return printf("[NOTICE] File Bugged.");
return mapid;
}
stock LoadNewMap()
{
new file[64];
LastMapStarted = mapid;
if(mapid == MAX_MAP_FILES) mapid = 1;
else mapid++;
format(file, sizeof(file), "/Maps/%d.ini", mapid);
if(!fexist(file)) return printf("[NOTICE] File Bugged.");
return mapid;
}
stock LoadNewMap(){
new file[64];
for(new mapid = 0; mapid < MAX_MAP_FILES; mapid++){
format(file,sizeof(file),"/Maps/%d.ini",mapid);
if(fexist(file)){
//more charging options
}
}
}