Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-10-19, 22:12


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

Ehm.. Nie dodawaj pod pierwszym includem, tylko na samym koncu. Najlepiej daj to tam, gdzie masz zmienne wszystkie (przyklad nizej)

Kod:


new costam;
new blalba[MAX_PLAYERS];
(..)


I jak wyskakuje error, to daj kod, linijk? z b??dem oraz error

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-19, 22:52


GreeN.







Wiek: 27
Na forum: 4652 dni
Posty: 137
Nick w MP: GreeN.

Piwa: 50

Respekt: 40

dodaje pod #define MSP MAX_PLAYERS i mam ci?gle te errory.

http://imgur.com/oyiaR0F wygl?da to tak :3 i ciagle errory tamte

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 00:06


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

Nie chodzi?o mi o sum? tych liczb, tylko zsumowa? ile liczb doda?e? do tej zmiennej, w klamerkach [ ] masz wpisa? 2, bo wpisa?e? w zmienn? 2 liczby tylko. Pisa?em jeszcze, ?eby w ostatniej liczbie nie dawa? przecinka - po 432 usu? ten przecinek. Powinno pom?c, jesli nie daj pozosta?e linijki, bo widz? ?e jeszcze w innych b??dy wyst?puj?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 09:33


GreeN.







Wiek: 27
Na forum: 4652 dni
Posty: 137
Nick w MP: GreeN.

Piwa: 50

Respekt: 40

o przecinku wiedzia?em XD tylko zapomnialem raz XD to pomog?o, ale errory dalsze te? s? z tym co pisa?em w pierwszym poscie tzn z tym samym :3

Kod:

C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9182) : error 033: array must be indexed (variable "InvalidVehicles")
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9197) : error 017: undefined symbol "PlayerCar"
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9197) : warning 215: expression has no effect
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9197) : error 001: expected token: ";", but found "]"
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9197) : error 029: invalid expression, assumed zero
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9197) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

Linijka 9197
Kod:

DestroyVehicle(PlayerCar[playerid]);

linijka 9182
Kod:

if(Model == InvalidVehicles[Order])


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 16:18


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

na g?rze tam gdzie zmienne.. dodaj jeszcze:
Kod:

new PlayerCar[MAX_PLAYERS];


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 17:22


GreeN.







Wiek: 27
Na forum: 4652 dni
Posty: 137
Nick w MP: GreeN.

Piwa: 50

Respekt: 40

Doda?em pod invalidVehicles i teraz mam...

Kod:

C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9183) : error 033: array must be indexed (variable "InvalidVehicles")
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9212) : error 010: invalid function or declaration
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9221) : error 017: undefined symbol "strrest"
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9221) : error 033: array must be indexed (variable "String")
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9675) : error 017: undefined symbol "strrest"
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9675) : error 033: array must be indexed (variable "BReason")
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(12875) : error 017: undefined symbol "strrest"
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(12875) : error 033: array must be indexed (variable "Reason")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 17:24


Madd







Wiek: 30
Na forum: 4802 dni
Posty: 763
Nick w MP: Madd

Piwa: 1975

Respekt: 524,3
Respekt: 524,3

GreeN., Podaj kod gdzie s? te b??dy.

Podpis


Wlasciciel serwera https://ptg-rp.pl/index.php oraz były Mod-Team Gtao.pl
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 18:07


GreeN.







Wiek: 27
Na forum: 4652 dni
Posty: 137
Nick w MP: GreeN.

Piwa: 50

Respekt: 40

9183: if(Model == InvalidVehicles[Order])

9212: */

9221: String = strrest(params, idx);

9678: BReason = strrest(params, idx);

12875: Reason = strrest(params, idx);

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 18:29


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

Dodaj to na samym koniuszku mapki:

Kod:


stock strrest(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[128];
while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 21:09


GreeN.







Wiek: 27
Na forum: 4652 dni
Posty: 137
Nick w MP: GreeN.

Piwa: 50

Respekt: 40

Kod:

C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9183) : error 033: array must be indexed (variable "InvalidVehicles")
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9212) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.


Linijka: 9183
if(Model == InvalidVehicles[Order])

i 9212
*/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 21:40


Combacior







Wiek: 29
Na forum: 5796 dni
Posty: 1516

Piwa: 2161

Respekt: 1060
Respekt: 1060

Ostrzeżeń: 20%
Kolega pomyli? tablic? wielowymiarow? z jednowymiarow?, kt?ra jest tutaj potrzebna. Zamie? t? tablic?.

Kod:

new const InvalidVehicles[] = {591, 429, 420};


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 21:45


GreeN.







Wiek: 27
Na forum: 4652 dni
Posty: 137
Nick w MP: GreeN.

Piwa: 50

Respekt: 40

zamieni?em i teraz mam:

Kod:

C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9184) : warning 219: local variable "InvalidVehicles" shadows a variable at a preceding level
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9185) : warning 217: loose indentation
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9184) : warning 204: symbol is assigned a value that is never used: "InvalidVehicles"
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9213) : error 010: invalid function or declaration
C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(18335) : warning 203: symbol is never used: "InvalidVehicles"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

zamieni?em if(Model == InvalidVehicles[Order]) na
new const InvalidVehicles[] = {591, 429, 420};

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 22:27


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

M?j kod:
Kod:




new InvalidVehicles[3][] =
{
591,
429,
420
};


Zamie? na ten co Ci da? CombaT :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 22:36


GreeN.







Wiek: 27
Na forum: 4652 dni
Posty: 137
Nick w MP: GreeN.

Piwa: 50

Respekt: 40

Kod:

C:\Users\Adrian\Desktop\Nowy folder (4)\gamemodes\psw.pwn(9208) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


9208: */

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-20, 22:41


ToxiC.







Wiek: 28
Na forum: 5246 dni
Posty: 3792

Piwa: 8590

Respekt: 1143,8
Respekt: 1143,8

Daj troche wiecej kodu +/- 10 linijek z g?ry i z do?u :)

Postaw piwo autorowi tego posta
 

 
Tagi: include :: pawn
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » include pawn Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku