- 0
(576) : warning 219: local variable "rows" shadows a variable at a preceding level
-
Similar Content
-
- 1 reply
- 39 views
-
- 1 reply
- 1,553 views
-
- 2 replies
- 3,774 views
-
- 2 answers
- 714 views
-
- 2 replies
- 728 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
star69
Salut!
Am adaugat un sistem de masini personale in gamemode
imi da acest warning:
(576) : warning 219: local variable "rows" shadows a variable at a preceding level
la linia 576 este :
new rows = cache_num_rows(handle), count = 0, tempString[16];
public OnPlayerLoadVehicles(playerid) { new rows = cache_num_rows(handle), count = 0, tempString[16]; if(rows > 0) { new tempInt; for(new z = 0; z < rows; z++) { for(new i = 0; i < MAX_VEH; i++) { if(Vehicles[i][vehStatus]) continue; Vehicles[i][vehStatus] = true; Vehicles[i][vehID] = cache_get_field_content_int(z, "id"); Vehicles[i][vehModel] = cache_get_field_content_int(z, "model"); cache_get_field_content(z, "owner", tempString); format(Vehicles[i][vehOwner], MAX_PLAYER_NAME, "%s", tempString); Vehicles[i][vehPos][0] = cache_get_field_content_float(z, "posX"); Vehicles[i][vehPos][1] = cache_get_field_content_float(z, "posY"); Vehicles[i][vehPos][2] = cache_get_field_content_float(z, "posZ"); Vehicles[i][vehPos][3] = cache_get_field_content_float(z, "posA"); Vehicles[i][vehColor][0] = cache_get_field_content_int(z, "color1"); Vehicles[i][vehColor][1] = cache_get_field_content_int(z, "color2"); Vehicles[i][vehInt] = cache_get_field_content_int(z, "int"); Vehicles[i][vehVW] = cache_get_field_content_int(z, "vw"); new a = 1; for(new w = 0; w < 14; w++) { format(tempString, sizeof(tempString), "mod%d", a); Vehicles[i][vehMods][w] = cache_get_field_content_int(z, tempString); a++; } tempInt = cache_get_field_content_int(z, "locked"); if(tempInt == 1) Vehicles[i][vehLock] = true; else Vehicles[i][vehLock] = false; tempInt = cache_get_field_content_int(z, "alarm"); if(tempInt == 1) Vehicles[i][vehAlarm] = true; else Vehicles[i][vehAlarm] = false; cache_get_field_content(z, "plate", tempString); format(Vehicles[i][vehPlate], 16, "%s", tempString); createVehicle(i); count++; break; } } } printf("Loaded %d vehicles from %s", count, GetName(playerid)); return 1; }
Ma poate ajuta cineva?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts