Ich hab ein Tanksystem für Feuerwehrwagen gemacht, nur leider hab ich " ein paar" warnings die ich nicht weg bekomme.
oben:
Code
new flot:wassert0 = 1000;
new flot:wassert1 = 1000;
new flot:wassert2 = 1000;
new flot:wassert3 = 1000;
new wassertt0;
new wassertt1;
new wassertt2;
new wassertt3;
onplayerkeystatechange
Code
if ((newkeys & KEY_FIRE || KEY_ACTION ) && !(oldkeys & KEY_FIRE || KEY_ACTION ))
{
if(IsPlayerInVehicle(playerid, feuercar[0]))
{
if(wassert0>=1)
{
wassertt0 = SetTimer("wasserttimer0", 1000, false);
}
else
{
RemovePlayerFromVehicle(playerid);
PutPlayerInVehicle(playerid, feuercar[0], 0);
}
}
else
if(IsPlayerInVehicle(playerid, feuercar[1]))
{
if(wassert1>=1)
{
wassertt1 = SetTimer("wasserttimer1", 1000, false);
}
else
{
RemovePlayerFromVehicle(playerid);
PutPlayerInVehicle(playerid, feuercar[1], 0);
}
}
else
if(IsPlayerInVehicle(playerid, feuercar[2]))
{
if(wassert2>=1)
{
wassertt2 = SetTimer("wasserttimer2", 1000, false);
}
else
{
RemovePlayerFromVehicle(playerid);
PutPlayerInVehicle(playerid, feuercar[2], 0);
}
}
else
if(IsPlayerInVehicle(playerid, feuercar[3]))
{
if(wassert3>=1)
{
wassertt3 = SetTimer("wasserttimer3", 1000, false);
}
else
{
RemovePlayerFromVehicle(playerid);
PutPlayerInVehicle(playerid, feuercar[3], 0);
}
}
}
if ((oldkeys & KEY_FIRE || KEY_ACTION) && !(newkeys & KEY_FIRE || KEY_ACTION))
{
if(IsPlayerInVehicle(playerid, feuercar[0]))
{
KillTimer(wassertt0);
}
else
if(IsPlayerInVehicle(playerid, feuercar[1]))
{
KillTimer(wassertt1);
}
else
if(IsPlayerInVehicle(playerid, feuercar[2]))
{
KillTimer(wassertt2);
}
else
if(IsPlayerInVehicle(playerid, feuercar[3]))
{
KillTimer(wassertt3);
}
}
Alles anzeigen
unten:
Code
public wasserttimer0(playerid)
{
if(wassert0 >=1)
{
wassert0 = wassert0 - 500;
KillTimer(wassertt0);
wassertt0= SetTimer("wasserttimer0", 1000, false);
}
else
{
RemovePlayerFromVehicle(playerid);
PutPlayerInVehicle(playerid, feuercar[0], 0);
}
}
public wasserttimer1(playerid)
{
if(wassert1 >=1)
{
wassert1 = wassert1 - 500;
KillTimer(wassertt1);
wassertt1= SetTimer("wasserttimer1", 1000, false);
}
else
{
RemovePlayerFromVehicle(playerid);
PutPlayerInVehicle(playerid, feuercar[1], 0);
}
}
public wasserttimer2(playerid)
{
if(wassert2 >=1)
{
wassert2 = wassert2 - 500;
KillTimer(wassertt2);
wassertt2= SetTimer("wasserttimer2", 1000, false);
}
else
{
RemovePlayerFromVehicle(playerid);
PutPlayerInVehicle(playerid, feuercar[2], 0);
}
}
public wasserttimer3(playerid)
{
if(wassert3 >=1)
{
wassert3 = wassert3 - 500;
KillTimer(wassertt3);
wassertt3= SetTimer("wasserttimer3", 1000, false);
}
else
{
RemovePlayerFromVehicle(playerid);
PutPlayerInVehicle(playerid, feuercar[3], 0);
}
}
Alles anzeigen
Die Errors:
Code
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(60) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(61) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(62) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(63) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(9405) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(9418) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(9431) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(9444) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13868) : warning 235: public function lacks forward declaration (symbol "wasserttimer0")
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13872) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13874) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13885) : warning 235: public function lacks forward declaration (symbol "wasserttimer1")
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13889) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13891) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13902) : warning 235: public function lacks forward declaration (symbol "wasserttimer2")
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13906) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13908) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13919) : warning 235: public function lacks forward declaration (symbol "wasserttimer3")
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13922) : warning 213: tag mismatch
C:\Users\Stefan\Desktop\serer\gamemodes\Emotion.pwn(13924) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
20 Warnings.
Alles anzeigen
Es währe wahrscheinlich auch mit weniger Timern gegangen aber ich bekomms anders nicht hin
mfg
fenestro