mark 0 Odesláno: 10. Srpen, 2012 Share Odesláno: 10. Srpen, 2012 Čaute potreboval by som pomôcť s warningami neviem ako to mam opraviť warning 219: local variable "health" shadows a variable at a preceding level kod: if(strcmp(cmdtext, "/oprav", true) == 0) { new Float:health,veh = GetPlayerVehicleID(playerid); if(Job[playerid] ==9 || Job[playerid] ==5) { GetVehicleHealth(veh, health); RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(veh,1000); bodymechanik[playerid] +=1; GivePlayerMoney(playerid,5); if(health >1000) return SendClientMessage(playerid,COLOR_RED," Za opravu auta si dostal 5 $ a 1 bod. "); } return 1; } a dalši taky warning warning 219: local variable "health" shadows a variable at a preceding level kod if(strcmp(cmdtext, "/repair", true) == 0) { new Float:health,veh = GetPlayerVehicleID(playerid); if(alevel[playerid] < 1) return SCM(playerid,COLOR_RED, "Nemáš dostatočný Admin level");//pokud nema admin level 2 for(new i = 0; i < 510; i++) { RepairVehicle (i); } { GetVehicleHealth(veh, health); RepairVehicle(GetPlayerVehicleID(playerid)); SetVehicleHealth(veh,1000); new string[50]; format(string, sizeof(string) , "Administrator vám opravil vozidlo" ,PlayerName(playerid));//formatuje text správy pre odoslanie SendClientMessageToAll(COLOR_WHITE, string); } return 1; } Link to comment Share on other sites More sharing options...
0 martinatoor 0 Odesláno: 10. Srpen, 2012 Share Odesláno: 10. Srpen, 2012 máš zle zatvorky vytvorene pred týmito príkazmi alebo už to tam maš definovane pretože v tychto prikazoch nemaš nič zle...pošli cely public OnPlayerCommandText(playerid, cmdtext[]) alebo pozri si zatvorky Link to comment Share on other sites More sharing options...
0 AK47 2 Odesláno: 20. Srpen, 2012 Share Odesláno: 20. Srpen, 2012 Těch warningů si nevšímej, nejsou důležité, jenom že je něco špatné ale je to spustiltelné. S errorem je to horší Link to comment Share on other sites More sharing options...
0 TheRohlikar 21 Odesláno: 20. Srpen, 2012 Share Odesláno: 20. Srpen, 2012 Warningů si nevšímej ? Pak se ale nediv, že ti to třeba nejde Warningy jsou taky důležité vyřešit To nesmí mít nic ! Link to comment Share on other sites More sharing options...
0 AK47 2 Odesláno: 20. Srpen, 2012 Share Odesláno: 20. Srpen, 2012 To by nemělo jít jenom při errorech ne? Link to comment Share on other sites More sharing options...
0 TheRohlikar 21 Odesláno: 20. Srpen, 2012 Share Odesláno: 20. Srpen, 2012 Áno A když máš Warningy, tak ti nedělá dobrotu.. Pád serveru je si myslim nejčastější Link to comment Share on other sites More sharing options...
0 rhsCZ 19 Odesláno: 20. Srpen, 2012 Share Odesláno: 20. Srpen, 2012 ja bych proměnnu nazval jinak u obou odlišné třeba u jednoho hp a u druheho třeba hpp pak by to nemělo nic psát Link to comment Share on other sites More sharing options...
Dotaz
mark 0
Čaute potreboval by som pomôcť s warningami neviem ako to mam opraviť
warning 219: local variable "health" shadows a variable at a preceding level
kod:
a dalši taky warning
warning 219: local variable "health" shadows a variable at a preceding level
kod
Link to comment
Share on other sites
6 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now