Szerző Téma: Valamilyen hiba  (Megtekintve 1254 alkalommal)

Nem elérhető NagyZ

Valamilyen hiba
« Dátum: 2011. Február 11. - 11:45:22 »
0 Show voters
Nem tudom milyen hiba itt a hibakód:
 
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6246) : error 010: invalid function or declaration
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6251) : error 022: must be lvalue (non-constant)
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6251) : warning 215: expression has no effect
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6258) : error 022: must be lvalue (non-constant)
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6258) : warning 215: expression has no effect
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6272) : error 010: invalid function or declaration

 
6233 sortól 6273 ig:
 
public SendPlayerFormattedText(playerid, const str[], define)
{
new tmpbuf[256];
format(tmpbuf, sizeof(tmpbuf), str, define);
SendClientMessage(playerid, 0xFF004040, tmpbuf);
}
public SendAllFormattedText(playerid, const str[], define)
{
new tmpbuf[256];
format(tmpbuf, sizeof(tmpbuf), str, define);
SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= \' \'))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
isStringSame(const string1[], const string2[], len) {
for(new i = 0; i < len; i++) {
    if(string1!=string2)
        return 0;
if(string1 == 0 || string1 == \'\\n\')
    return 1;
}
return 1;
}
return 0;
}

 
Mindenhogy próbálkoztam de sehogy sem ment
Valaki segítsen pls. :)

Nem elérhető tja

  • 107
    • Profil megtekintése
Valamilyen hiba
« Válasz #1 Dátum: 2011. Február 11. - 12:03:18 »
0 Show voters
Szedd ki belõle a constansokat(állandók)..\"const\"

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Valamilyen hiba
« Válasz #2 Dátum: 2011. Február 11. - 13:13:35 »
0 Show voters
return 0;
}

 
-t vedd ki.

Nem elérhető NagyZ

Valamilyen hiba
« Válasz #3 Dátum: 2011. Február 11. - 13:20:34 »
0 Show voters
Kivettem, ezeket adta ki:
 
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6221) : warning 235: public function lacks forward declaration (symbol \"SendPlayerFormattedText\")
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6228) : warning 235: public function lacks forward declaration (symbol \"SendAllFormattedText\")
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6234) : error 010: invalid function or declaration
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6239) : error 022: must be lvalue (non-constant)
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6239) : warning 215: expression has no effect
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6246) : error 022: must be lvalue (non-constant)
H:\\SDD\\Modok\\[HUN] Stunt+Drift+Dm szerver\\sdd.pwn(6246) : warning 215: expression has no effect

 
6221 sortól 6259 ig:
 
public SendPlayerFormattedText(playerid, const str[], define)
{
new tmpbuf[256];
format(tmpbuf, sizeof(tmpbuf), str, define);
SendClientMessage(playerid, 0xFF004040, tmpbuf);
}
public SendAllFormattedText(playerid, const str[], define)
{
new tmpbuf[256];
format(tmpbuf, sizeof(tmpbuf), str, define);
SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= \' \'))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
isStringSame(const string1[], const string2[], len) {
for(new i = 0; i < len; i++) {
    if(string1!=string2)
        return 0;
if(string1 == 0 || string1 == \'\\n\')
    return 1;
}
return 1;
}

Valaki segítsen pls. :)

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Valamilyen hiba
« Válasz #4 Dátum: 2011. Február 11. - 13:24:45 »
0 Show voters
Nekem hibátlan.  :D
De ha végképp nem megy, akkor PM-be küld el a módot és kijavítom.  ;)

Valamilyen hiba
« Válasz #5 Dátum: 2011. Február 11. - 13:48:09 »
0 Show voters
szerintem feleslegesen csinálok \"public\"-nak, meg ez egy úgynevezett függvény..
 
stock SendPlayerFormattedText(playerid, const str[], define)
{
   new tmpbuf[256];
   format(tmpbuf, sizeof(tmpbuf), str, define);
   SendClientMessage(playerid, 0xFF004040, tmpbuf);
   return 1;
}
stock SendAllFormattedText(playerid, const str[], define)
{
   new tmpbuf[256];
   format(tmpbuf, sizeof(tmpbuf), str, define);
   SendClientMessageToAll(0xFFFF00AA, tmpbuf);
   return 1;
}
stock strtok(const string[], &index)
{
   new length = strlen(string);
   while ((index < length) && (string[index] <= \' \'))
   {
   index++;
   }
   new offset = index;
   new result[20];
   while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1)))
   {
      result[index - offset] = string[index];
      index++;
   }
   result[index - offset] = EOS;
   return result;
}
stock isStringSame(const string1[], const string2[], len) {
   for(new i = 0; i < len; i++) {
       if(string1!=string2)
           return 0;
      if(string1 == 0 || string1 == \'\\n\')
          return 1;
   }
   return 1;
}

Nem elérhető NagyZ

Valamilyen hiba
« Válasz #6 Dátum: 2011. Február 11. - 15:53:44 »
0 Show voters
Erre is errorozik..
IceMan-nak elküldtem a modot remélem megcsinálja :)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal