warning - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning (
/showthread.php?tid=535053)
warning -
hillko - 01.09.2014
C:\Users\hillko\Desktop\bRush.pwn(41062) : warning 219: local variable "id" shadows a variable at a preceding level
C:\Users\hillko\Desktop\bRush.pwn(41096) : warning 219: local variable "id" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
Re: warning -
Stinged - 01.09.2014
You have the variable id as a global variable somewhere in your gamemode/includes.
Re: warning -
hillko - 01.09.2014
Quote:
Originally Posted by Stinged
You have the variable id as a global variable somewhere in your gamemode/includes.
|
in the gamemode I have and what needs to be done ?
Re: warning -
GGRoleplay - 01.09.2014
Just change the new id in the place where you're getting the errors change it to new id2 or whatever
Re: warning -
Stinged - 01.09.2014
Change the LOCAL (not global) variable name from id to something else like pid or something.
Re: warning -
SanAndreasMP - 01.09.2014
Quote:
Originally Posted by ******
Are we meant to guess your codes?
|
I want to say that. Care to tell us the code?
Re: warning -
Stinged - 01.09.2014
Quote:
Originally Posted by SanAndreasMP
I want to say that. Care to tell us the code?
|
No codes are actually needed for this.
We already told him how to fix it.
Re: warning -
hillko - 01.09.2014
Quote:
Originally Posted by Stinged
No codes are actually needed for this.
We already told him how to fix it.
|
C:\Users\hillko\Desktop\bRush.pwn(41096) : error 079: inconsistent return types (array & non-array)
C:\Users\hillko\Desktop\bRush.pwn(41101) : error 079: inconsistent return types (array & non-array)
C:\Users\hillko\Desktop\bRush.pwn(41112) : error 090: public functions may not return arrays (symbol "CreateVehicleObject")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Код HTML:
41095 public CreateVehicleObject(modelid, vehicleid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:stream_distance){
41096 if (vehicleid == 0 || vehicleid == INVALID_VEHICLE_ID || modelid ==0) return 0;
41097 new ids;
41098 for (new i=1; i < MAX_VEHICLE_OBJECTS; i++) if (objects[i][object_modelid] == 0) {
41099 ids = i;
41101 break; }
41102 if (ids == 0) return 0;
41103 objects[ids][object_x] = fOffsetX;
41104 objects[ids][object_y] = fOffsetY;
41105 objects[ids][object_z] = fOffsetZ;
41106 objects[ids][object_rx] = fRotX;
41107 objects[ids][object_ry] = fRotY;
41108 objects[ids][object_rz] = fRotZ;
41109 objects[ids][object_distance] = stream_distance;
41110 objects[ids][object_vehicleid] = vehicleid;
41111 objects[ids][object_objectid] = 0;
41112 objects[ids][object_modelid] = modelid;
41113 return id;
41114}
Re: warning -
hillko - 01.09.2014
DELLETЕ TEMS